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.
Hi,
I have below kind of data. I want to show grand total only of the uniquhe values per FN. Any help is appreciated. Thanks.
FN | LocNo | Count |
1 | 5 | 1 |
2 | 10 | 1 |
58 | 1 | |
Grand Total | 2 |
Solved! Go to Solution.
Hi @Anonymous ,
You could try below measure
Measure 4 = IF(HASONEVALUE(t3[FN]), DISTINCTCOUNT(t3[FN]), CALCULATE(DISTINCTCOUNT(t3[LocNo]), t3[FN]<>BLANK()))
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
You could try below measure
Measure 4 = IF(HASONEVALUE(t3[FN]), DISTINCTCOUNT(t3[FN]), CALCULATE(DISTINCTCOUNT(t3[LocNo]), t3[FN]<>BLANK()))
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Grand total should be displayed as 2 because the unique values by FN is 2. Generally, total is 3 but it should be displayed as 2 even if total is 3.
Hi @Anonymous, have you tried using the measure No Count = DISTINCTCOUNT(TableName[FN])?
Respectfully,
Zoe Douglas (DataZoe)
Follow me on LinkedIn at https://www.linkedin.com/in/zoedouglas-data
See my reports and blog at https://www.datazoepowerbi.com/
Ah I see! Have you tried No Count = DISTINCTCOUNTNOBLANK(TableName[FN])?
Respectfully,
Zoe Douglas (DataZoe)
Follow me on LinkedIn at https://www.linkedin.com/in/zoedouglas-data
See my reports and blog at https://www.datazoepowerbi.com/
@DataZoe Thanks for your reply but sorry it didn't work. Only grand total should have distinct but at the subtotal level it shouldn't be. I tried with sumx but somehow I didn't succeed.
@Anonymous ,
Let me know is this your expected output?
thanks @Tahreem24 for your efforts but in measure1 there will be 1 1 1 in each row so total will be 3 ideally but it will show 2. Basically, I want that only grand total should be of unique values.
@Anonymous ,
Not exact getting your query. PLease share some more deets.
But if you want get the unique value so Use DISTINCT(TableName[ColumnName])
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
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 |
---|---|
117 | |
104 | |
77 | |
73 | |
50 |
User | Count |
---|---|
145 | |
109 | |
108 | |
90 | |
64 |