Forum Discussion
Aguilucho24
3 years agoRegular Visitor
Getting % when selecting a Filter within Power BI
Hello BI Community, I have a power BI sheet which has different options of filters. I want to know formula of total lines in report divided by choosen filter. Example, I have Open Order Report ...
marcosvin
3 years agoResolver II
Hello!
If I understand correctly you first need the overall total count of rows in the table, then the total rows with status = HOLD and then the percentage of these rows in relation to the grand total. When selecting an order in the slicer, it will show the percentage of that order with status = HOLD in relation to the grand total.
If so, you can create the metrics in Power BI like this:
Total rows = CALCULATE(COUNTROWS(Fact_Table),ALL(Fact_Table))
Rows HOLD STATUS = CALCULATE(COUNTROWS(Fact_Table),Orders[Status]="HOLD")
% Rows on HOLD STATUS = DIVIDE([Rows HOLD STATUS],[Total rows],0)