The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi All,
I would like to calculate the distinct count of USERID by DATE and CUSTOMER TYPE for Year-to-Date (1/1/2021 – 5/1/2021).
Sample table:
Expected outcome in the table:
Expected outcome in matrix table:
Any help would be much appreciated.
Thanks in advance!
Kindly Regards,
Milan
Hi,
Please check the below picture and the attached pbix file.
@Milan14 ,
Try a measure like
calculate(sumx(summarize(Table, Table[Date], Table[Customer Type], "_1", distinctcount(Table[UserID]) ), [_1]), datesytd('Date'[Date]))
datesytd , in case you need ytd
User | Count |
---|---|
25 | |
12 | |
8 | |
8 | |
7 |
User | Count |
---|---|
28 | |
13 | |
12 | |
12 | |
6 |