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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
AmberJane
Helper II
Helper II

% Calculations in Power BI

I am not sure why this is so hard. I tried using quick measures but I am getting nowhere. 

 

This first report here I want to create a column (I think?)  that gives me the % of closed. So there is 306 tickets and 165 are closed so I would I shoud see 54%. 

 

AmberJane_0-1645117247320.png

For this report I have the closed tickets from the previous report and I want to do a % of the types of closure reasons from the total number of the tickets. So I would expect to see 83% resolved, 16% Declined and 1% Declined - Too Old to Fix. Keeping in mind that we may add more closure reasons down the line. 

 

AmberJane_1-1645117329633.png

 

8 REPLIES 8
Anonymous
Not applicable

Hi, 

I think you should be using a calculated measure instead of a calculated column because both of these have a different method of calculation.

Calculated columns perform calculations at row level and calculated measures perform calculations at an aggregated level which is suitable for percentage calculations. 

Here's a mathematical description of the above statement. 

Noorani_0-1645126930605.png

 

amitchandak
Super User
Super User

@AmberJane , if you want show % of total in table for measure M1

 

You can try

 

divide([M1], calculate([M1], allselected())

 

% of closed at GT level 

 

divide(calculate([M1], filter(Table, Table[Item Status] ="Closed")),calculate([M1], allselected())

 

or

 

divide(calculate([M1], filter(Table, Table[Item Status] ="Closed")), [M1])

Ok I was able to get the first report working using the calculation you provided. See screenshot below! However, the second report I am still stuck on. 

 

For this report I have the closed tickets from the previous report and I want to do a % of the types of closure reasons from the total number of the closed tickets. So I would expect to see 83% resolved, 16% Declined and 1% Declined - Too Old to Fix. 

AmberJane_0-1645129351724.png

 

Hi @AmberJane,

Can you please share a pbix or some dummy data that keep raw data structure with expected results? It should help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly  

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

When I try to attach test data I am getting the error .pbix is not supported. However, I have seen other people post this file type in the past. I am not sure what I am doing wrong.

 

HI @AmberJane,

Yes, current community users did not have permission to upload files.
You can consider uploading it to your netdrive and sharing the file link here or exporting these records to an excel sheet and pasting them to your reply in table format.

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

I may have figured it out. Stand by! haha 

Hello, I am playing around with this but not sure what M1 would be in the calculation? Nothing is autopopulating. 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.