Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
pparke
Frequent Visitor

Help! Unable to calculate percentage of grand total of rows within a column

Inexpereinced power bi user here.

 

I have a column named 'pandemic related leave'. Value of 1 relates to leave request being pandemic related, otherwise no value. I am wanting to display the percentage of pandemic related leave  i.e 44 rows with 1, total rows of 9840. Percentage should be .44%.

 

When i select show value as percentage of grand total it remains at 100%. 

 

Any ideas?

TIA

3 REPLIES 3
amitchandak
Super User
Super User

@pparke ,

Try like

divide(calculate(countrows(filter(Table,table[pandemic related leave]=1))),calculate(countrows(Table),all(Table)))

 

Mark this as %.

Data Format New Rib.png

I tried this and get error message below:

 

The syntax for 'Yes' is incorrect. (DAX(divide(calculate(countrows(filter(Pandemic Yes,Pandemic Yes[Pandemic Yes]=1))),calculate(countrows(Pandemic Yes),all(Pandemic Yes))))).

Hi @pparke ,

 

Can you share some sample data? It's hard to write formula with out any sample data.

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.