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.
Experts, I need your help to fix the DAX formula. The below measure should sum up all the values as denominator in the measure. Actually, I am not able to sum those values as Link ID column datatype in text. Below is the measure written with hardcoded value, but I would like to see that in dynamically should sum up in denominator.
Thanks,
Bala
Solved! Go to Solution.
@BalaKiranM , Try a measure like
% Link ID = divide( DISTINCTCOUNT('Query 1'[Link ID]), calculate( DISTINCTCOUNT('Query 1'[Link ID]), allselected())
https://learn.microsoft.com/en-us/dax/allselected-function-dax
Hi @BalaKiranM,
I'd like to suggest you add a variable with summarize function to aggregate these ID at first, then you can simply summary these results to calculate with current id:
% Link ID =
VAR summary =
SUMMARIZE (
ALLSELECTED ( 'Query 1' ),
[Category],
"DC LID", DISTINCTCOUNT ( 'Query 1'[Link ID] )
)
RETURN
DISTINCTCOUNT ( 'Query 1'[Link ID] ) / SUMX ( summary, [DC LID] )
Regards,
Xiaoxin Sheng
Hi @BalaKiranM,
I'd like to suggest you add a variable with summarize function to aggregate these ID at first, then you can simply summary these results to calculate with current id:
% Link ID =
VAR summary =
SUMMARIZE (
ALLSELECTED ( 'Query 1' ),
[Category],
"DC LID", DISTINCTCOUNT ( 'Query 1'[Link ID] )
)
RETURN
DISTINCTCOUNT ( 'Query 1'[Link ID] ) / SUMX ( summary, [DC LID] )
Regards,
Xiaoxin Sheng
@BalaKiranM , Try a measure like
% Link ID = divide( DISTINCTCOUNT('Query 1'[Link ID]), calculate( DISTINCTCOUNT('Query 1'[Link ID]), allselected())
https://learn.microsoft.com/en-us/dax/allselected-function-dax
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
49 | |
25 | |
20 | |
15 | |
12 |
User | Count |
---|---|
57 | |
49 | |
44 | |
19 | |
18 |