Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi All - This is my current formula to calculate a monthly distinct count of serial numbers:
Distinct Serial Numbers RRR = SUMX(
values(table1[month]),
CALCULATE(
DISTINCTCOUNT(table1[serial])
)
)
I initially get the expected results:
However, if I filter any of the top columns, the total becomes the grand total:
I have tried hasonefilter on month and on warranty (the column row), to no avail. Any one have a similar issue?
Solved! Go to Solution.
Hi @Rodriguez ,
I created some data:
Here are the steps you can follow:
1. Create measure.
Measure =
var _table1=SUMMARIZE('Table','Table'[Group3],"Value",[Distinct Serial Numbers RRR])
return
IF(
HASONEVALUE('Table'[Group3]),[Distinct Serial Numbers RRR],SUMX(_table1,[Value]))
2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @Rodriguez ,
I created some data:
Here are the steps you can follow:
1. Create measure.
Measure =
var _table1=SUMMARIZE('Table','Table'[Group3],"Value",[Distinct Serial Numbers RRR])
return
IF(
HASONEVALUE('Table'[Group3]),[Distinct Serial Numbers RRR],SUMX(_table1,[Value]))
2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
@Greg_Deckler Hey, really not sure how these videos and articles relate. I am using SUMX, which is only wrong when there is something filtered.
@Rodriguez If you can provide sample data, I can demonstrate.
@Rodriguez Often ISINSCOPE and/or HASONEVALUE works better than HASONEFILTER. First, please vote for this idea: https://ideas.powerbi.com/ideas/idea/?ideaid=082203f1-594f-4ba7-ac87-bb91096c742e
This looks like a measure totals problem. Very common. See my post about it here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376
Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907
Also: https://youtu.be/uXRriTN0cfY
And: https://youtu.be/n4TYhF2ARe8
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
144 | |
75 | |
63 | |
51 | |
48 |
User | Count |
---|---|
204 | |
86 | |
64 | |
59 | |
56 |