Forum Discussion
Count records in table ignoring groups in a table in Power Bi
- Anonymous3 years ago
Hi Raj12 ,
Why is the total 8 and not 9?Please check if this is your expected output.
pecentage per group = VAR _count = COUNTROWS('Table') VAR _count_all = CALCULATE(COUNTROWS('Table'),ALL()) VAR _result = DIVIDE(_count,_count_all) RETURN _resultIf you need the total to always be at 100%, try this.
VAR _count = COUNTROWS('Table') VAR _count_all = CALCULATE(COUNTROWS('Table'),ALLSELECTED()) VAR _result = DIVIDE(_count,_count_all) RETURN _resultBest Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Hi Raj12 ,
Why is the total 8 and not 9?
Please check if this is your expected output.
pecentage per group =
VAR _count = COUNTROWS('Table')
VAR _count_all = CALCULATE(COUNTROWS('Table'),ALL())
VAR _result = DIVIDE(_count,_count_all)
RETURN
_result
If you need the total to always be at 100%, try this.
VAR _count = COUNTROWS('Table')
VAR _count_all = CALCULATE(COUNTROWS('Table'),ALLSELECTED())
VAR _result = DIVIDE(_count,_count_all)
RETURN
_result
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum