This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Hai All, I need one help on this
The above table % Share range is the expecting output
I want to achieve this logic at the Dax level
Users want to see the % total at the country level
For eg: For DE (18+13+10+2+22) = 65
18/65*100 = 27.69 For DE For "above target" category
and for the model number calculation i used DISTINCT COUNT and model number column is the test data type
Please help me to achieve this logic in dax level
Solved! Go to Solution.
Hi @Anonymous
Please use the following code
% Share Range =
VAR Numerator = [# Model Number]
VAR T1 =
CALCULATETABLE ( Initiative, ALLEXCEPT ( Initiative, Initiative[Country] ) )
VAR T2 =
SUMMARIZE ( T1, Initiative[Country], Initiative[Category] )
VAR T3 =
ADDCOLUMNS ( T2, "Models", [# Model Number] )
VAR Denominator =
SUMX ( T3, [Models] )
RETURN
IF ( HASONEVALUE ( Initiative[Country] ),
DIVIDE ( Numerator, Denominator ),
1
)
Hi @Anonymous
Please use the following code
% Share Range =
VAR Numerator = [# Model Number]
VAR T1 =
CALCULATETABLE ( Initiative, ALLEXCEPT ( Initiative, Initiative[Country] ) )
VAR T2 =
SUMMARIZE ( T1, Initiative[Country], Initiative[Category] )
VAR T3 =
ADDCOLUMNS ( T2, "Models", [# Model Number] )
VAR Denominator =
SUMX ( T3, [Models] )
RETURN
IF ( HASONEVALUE ( Initiative[Country] ),
DIVIDE ( Numerator, Denominator ),
1
)
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 10 | |
| 8 | |
| 8 | |
| 6 | |
| 6 |