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
matpat1284
New Member

Calculate % of total value of each category

Hi,

 

I've got a large dataset of volumes per each category, my table looks like this:

 

DateCategoryVolume
1.01.2023A1023
1.01.2023B421
1.01.2023C241
1.01.2023D144

 

 

I would like to build up a visual that shows % of each category per day vs the total sum of the volume. 

 

How to write a formula in Power BI to achieve this?

9 REPLIES 9
matpat1284
New Member

It doesn't work for me 🤔

matpat1284_0-1675953244050.png

 

Could you please provide the Measure that you have used

 

Payments % = Divide (CALCULATE(SUM(FT[ORDERS_VOLUME])), CALCULATE (SUM(FT[ORDERS_VOLUME]), ALLSELECTED (FT)))


Looks ok. Could you please increase decimals to 2 in the format of the measure?

 

it is ok, if you look at grand total, however, I would like to include the same for each day, so it seems like it does not count it for each day but only for the overall period

matpat1284_0-1675955815341.png

 

If you want Sub totals for each day, you may try turning subtotals on in the formatting of the visual

I want to build it this way: 

matpat1284_0-1675956199678.png



However, with this formula it gives me inaccurate percentages. For each day each category should give 100% as a sum, whereas here it's showing % of all per selected period of time I guess

If you could giveme the pbix file, I can explore

Padycosmos
Solution Sage
Solution Sage

Hope this helps:

Padycosmos_0-1675951315743.png

 

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.