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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
VanshikaB
Frequent Visitor

Issue with Weightage % Calculation in Power BI DAX

Hi All,
Working on calculating the Weightage % for different segments in Power BI, where the formula is supposed to be:
Weightage % = (Segment Level Net Sales / Total Net Sales)

I'm working with a dataset that includes a CY (Current Year) column, Segment, Region and other financial metrics like Growth %, SG&A %, Weightage %, Net Sales and others, under Hierarchy1 column as shown in the attached image below,

VanshikaB_0-1728231753887.png


The second image is from the Power BI matrix where I'm displaying the data. I’ve created a DAX formula to calculate the percentages, but not sure on how to calculate Weightage % since its formula says (Segment Level Net Sales / Total Net Sales) and 'Net Sales' is also under Hierarchy1 column

VanshikaB_1-1728231951883.png

 

The values for all other metrix under 'Hierarchy1' column are coming correct except for Weightage %
The correct values are not shown because of the privacy of client data

Here’s the DAX formula used for the calculation:

CY_Category_PERCENTAGE =
VAR _P1 =
CALCULATE(
[CY],
FILTER(
DM_AF_PL_REPORT,
DM_AF_PL_REPORT[HIERARCHY1] IN {
"CM %", "EBIT %", "MOE (Total) %", "GP %", "SG&A (Total) %",
"CM (w/o IL Allocations) %", "SG&A (Local) %", "MOE %",
"EBIDTA %", "GSP Allocations %", "IL Allocations %", "Segment %"
}
)
)

VAR _G1 =
CALCULATE(
[CY],
FILTER(
DM_AF_PL_REPORT,
DM_AF_PL_REPORT[HIERARCHY1] = "Growth %"
)
)

VAR _G2 =
CALCULATE(
[PY],
FILTER(
DM_AF_PL_REPORT,
DM_AF_PL_REPORT[HIERARCHY1] = "Growth %"
)
)

VAR _COND =
SWITCH(
TRUE(),
NOT(ISBLANK(_P1)), FORMAT(DIVIDE(_P1, [CY Net Sales]), "0.0%"),
NOT(ISBLANK(_G1)), FORMAT((DIVIDE(_G1, _G2) - 1), "0.0%"),
DIVIDE([CY], 1000000)
)

RETURN _COND


What additions can be done in DAX to calculate correct values for Weightage % ?

1 REPLY 1
lbendlin
Super User
Super User

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information. Do not include anything that is unrelated to the issue or question.

Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Kudoed Authors