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 September 15. Request your voucher.
I have an invoice table which have invoicedate column indicating the invoice date for each invoice. I have to calculate the distinct count of months in each year, and each year have different distinct months. For this current year upto this date of third month it should calulate 3 for year 2022. I have to keep the logic dynamic like after two next months of invoices, my dax expression should calculate 5.
Can anyone design the dax expression for this?
Thank You
Hi,
I recommend utilizing TODAY like this to achiece this:
Proud to be a Super User!
@ScottWalter , you should use the date table with moth year, year, joined with the invoice. Then you can create measure like
calculate(distinctcount('Date'[month Year]), filter(Invoice, not(isblank([invoice Date]))))
User | Count |
---|---|
14 | |
11 | |
8 | |
6 | |
5 |
User | Count |
---|---|
28 | |
18 | |
13 | |
7 | |
5 |