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
sophie63
Helper I
Helper I

Percentage Matrix with subcategories

Hello,

 

i have troubles calculating percentages with subcategories. See below I would like in the 3rd column to calculate the % over the total net sales, but it's filtered per subcategories. How  can I solve that? See below the formulas I used

%category.PNG

 

 

3rd column: Perc_Total_NetSales = var Totalvalue = SUMX(ALL(ViewReportingSummary[SalesSourceDesc]);
 CALCULATE(SUM(ViewReportingSummary[Net_Sales_Value])))
 return divide(SUM(ViewReportingSummary[Net_Sales_Value]); Totalvalue)

 

4th column:Perc_Total_NetSales_Tot = var Totalvalue = SUMX(ALL(ViewReportingSummary[Online Sales]);
 CALCULATE(SUM(ViewReportingSummary[Net_Sales_Value])))
 return divide(SUM(ViewReportingSummary[Net_Sales_Value]); Totalvalue)

1 ACCEPTED SOLUTION
v-qiuyu-msft
Community Support
Community Support

Hi @sophie63,

 

Please try to modify the 3rd column DAX to below:

 

Perc_Total_NetSales =
var Totalvalue = CALCULATE(SUM(ViewReportingSummary[Net_Sales_Value]);ALL('ViewReportingSummary'))
 return
divide(SUM(ViewReportingSummary[Net_Sales_Value]); Totalvalue)

 

 

Best Regards,
Qiuyun Yu

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

View solution in original post

2 REPLIES 2
v-qiuyu-msft
Community Support
Community Support

Hi @sophie63,

 

Please try to modify the 3rd column DAX to below:

 

Perc_Total_NetSales =
var Totalvalue = CALCULATE(SUM(ViewReportingSummary[Net_Sales_Value]);ALL('ViewReportingSummary'))
 return
divide(SUM(ViewReportingSummary[Net_Sales_Value]); Totalvalue)

 

 

Best Regards,
Qiuyun Yu

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

Perfect, that works, thanks a lot!

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.