Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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 November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 21 | |
| 10 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 35 | |
| 31 | |
| 20 | |
| 13 | |
| 10 |