Good day to all!I have a table with tasks that one or another counterparty (person) performs
My task is:
- Group the data by counterparty and how many tasks he completed
- Find the value of 25% 50% 75% percentile in this table
- 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
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)))