Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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
)
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 6 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 16 | |
| 8 | |
| 7 | |
| 7 |