Forum Discussion
YTD DistinctCount not totaling correctly
I have this table attached to a slicer and everything after January for the YTD# column(distinctcount member number) seems to subtract 1 from the overall total row. Please advise. I have tried everything I can think of. The YTD# total count should be 1,817 if you manually add the 2 rows above. Currently it shows 1,816. All other columns look correct except this one.
Edit: I just noticed the February monthly # column is doing the same thing....
Below are my current measures/calculated columns:
Here's a stripped down version with the data randomized for testing - thank you
The YTD # column is not totalling correctly across all months YTD
Hi,
The problem is in Feb. The # adds upto 426 though it should add up to 427. It means that there is a member being considered both in new and old in that month itself. Check your data. Make the corrections mentioned in my previous post.
11 Replies
- Ashish_Excel
Solution Supplier
Hi,
Not sure of what you are trying to do. Share the download link of the PBI file. Show the problem and the expected result.
- mclawler
Helper III
Here's a stripped down version with the data randomized for testing - thank you
The YTD # column is not totalling correctly across all months YTD
- Ashish_Excel
Solution Supplier
Hi,
Change the relationship to Many to One (from Many to Many). Simplify your measure to
MemberNumberYTD DISTINCTCOUNT = CALCULATE([Consider HELOC Advances Count Sub],DATESYTD(DateTable[Date]))The answer will still be 926 and 138 and the total is 1002. Since it is a distinctcount, the answer cannot be additive. If you really want to add the 2 distinctcount values, then write this measure
Measure = SUMX(VALUES(Heloc3MonthAdvances[Existing/New]),[MemberNumberYTD DISTINCTCOUNT])
- AnonymousNot applicable
Hello mclawler ,
Thank you for reaching out to Microsoft Fabric Community Forum.
Ashish_Excel Thank you for your quick response.
mclawler, as Ashish_Excel mentioned,to better understand your scenario and provide more accurate suggestions, could you please share a small sample of your dataset along with the expected output? Please make sure to remove any sensitive or confidential information.
This will help the community replicate your issue or use case more effectively and offer specific guidance.
Regards,
B Manikanteswara Reddy
- mclawler
Helper III
Here's a stripped down version with the data randomized for testing - thank you
The YTD # column is not totalling correctly across all months YTD
- AnonymousNot applicable
Hello mclawler ,
Thank you for sharing the details! Just to confirm , the super user Ashish_Excel answer is absolutely correct. The key issue lies in the relationship type between your tables.
Please change the relationship from many-to-many to many-to-one between Heloc3MonthAdvances and DateTable. Once that's corrected, the measures suggested by the super user will work as intended and will give you the correct YTD total.
If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" ā Iād truly appreciate it!
Regards,
B Manikanteswara Reddy
Regards,
B Manikanteswara Reddy