Forum Discussion
Distribute a table between %
- 3 years ago
Are you expecting something like this:
It hides some complexity, we would need to create a segment table like below:
Based on the Segment table and the orginal Data table, we could get your expected table with a calculated table with the code below:
SegmentCount =VAR _table =ADDCOLUMNS(SUMMARIZE (Data, Data[UniqueID]),"PctCount",VAR CompleteCount =CALCULATE (COUNTROWS(FILTER(Data, Data[Status] = "Completed")))VAR TotalCount =CALCULATE (COUNTROWS(Data),ALLEXCEPT(Data, Data[UniqueID]))RETURNDIVIDE (CompleteCount, TotalCount, 0 ))RETURNADDCOLUMNS(Segment,"Count of Unique Employees",COUNTROWS(FILTER (_table,AND ([PctCount]>=Segment[Min], [PctCount]<Segment[Max])))) - Anonymous3 years ago
Hi drakwen ,
Looking forward to your next reply. If you validate that the method provided by FreemanZ and amitchandak can help you get the solution later, could you please mark it as Answered? It will help the others in the community find the solution easily if they face the same problem as yours. Thank you.
Best Regards
Are you expecting something like this:
It hides some complexity, we would need to create a segment table like below:
Based on the Segment table and the orginal Data table, we could get your expected table with a calculated table with the code below:
Hi FreemanZ and amitchandak
I tried both your methods and both return the samer result, two equal results split into two ranges 25%-50% and 75%-99% for 297. I know that my actual result should be around 6k, so I will try this week to limit the database to 1000 results and play until I discover what is going on with my data, because I am pretty sure both your answers are correct.
Many thanks for both your replies, I'll keep you posted.
- Anonymous3 years agoNot applicable
Hi drakwen ,
Looking forward to your next reply. If you validate that the method provided by FreemanZ and amitchandak can help you get the solution later, could you please mark it as Answered? It will help the others in the community find the solution easily if they face the same problem as yours. Thank you.
Best Regards
- drakwen3 years agoNew Member
I confirm it now works!! It was my data that was failing