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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hello,
My database structured like this. I want to calculate YTD value for each month but on distinct values
ID | DATE_COD | STATUS |
ID1 | 20220101 | Active |
ID1 | 20220201 | Active |
ID1 | 20220301 | Active |
ID1 | 20220401 | Terminated |
ID2 | 20220101 | Active |
ID2 | 20220201 | Terminated |
20220101 - 2 unique items were active between start of the year till date
20220101 - 2 unique items were active between start of the year till date
20220301 - 2 unique items were active between start of the year till date
because doing it a normal way with datesytd I got 2 for Jan, 3 for Feb, 4 for March. But these are only two items and they were active!
Thank you in advance for your help
Solved! Go to Solution.
Hi,
You may download my PBI file from here.
Hope this helps.
Hi,
You may download my PBI file from here.
Hope this helps.
use DISTINCTCOUNT() instead of COUNT()
User | Count |
---|---|
98 | |
76 | |
74 | |
49 | |
26 |