Quantcast
Channel: Active questions tagged return-value - Stack Overflow
Viewing all articles
Browse latest Browse all 207

Assigning points based on quartiles (percentiles) according to a grouped virtual table

$
0
0

Good day to all!I have a table with tasks that one or another counterparty (person) performs

My task is:

  1. Group the data by counterparty and how many tasks he completed
  2. Find the value of 25% 50% 75% percentile in this table
  3. Based on the found percentile data, assign your score to the counterparty
    • if the number of tasks is less than 25% percentile- 1 point
    • if the number of tasks is less than 50% percentile- 2 points
    • if the number of tasks is less than 75% percentile- 3 points
    • if the number of tasks is more than 75% percentile- 4 points

enter image description here

I created this measure, I don't understand why it gives 0 everywhere

Points based on the volume of tasks = VAR table1= CALCULATETABLE(GROUPBY('RTO_RegionMountView2',RTO_RegionMountView2[Контрагент],"Counttasks",COUNTAX(CURRENTGROUP(),VALUE('RTO_RegionMountView2'[task]))),FILTER('RTO_RegionMountView2','RTO_RegionMountView2'[Contragent]<>BLANK()))VAR p25 =    PERCENTILEX.INC (table1,[Counttasks],0.25 )VAR p50 =    PERCENTILEX.INC (table1,[Counttasks],0.5 )VAR p75 =    PERCENTILEX.INC (table1,[Counttasks],0.75 )RETURN    IF(SUMX(table1,[Counttasks])<p25,1,IF(SUMX(table1,[Counttasks])<p50,2,IF(SUMX(table1,[Counttasks])<p75,3,IF(SUMX(table1,[Counttasks])>p75,4,0))))

Another very important point is that this measure can be dynamically changed in accordance with these filters in power bi

help to identify the error)))


Viewing all articles
Browse latest Browse all 207

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>