This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreDid you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now
Hi All,
I have a column called 'Dates' this column shows various dates.
Please can you show me the DAX to count the number of rows with dates in the last month?
Many thanks,
E
Solved! Go to Solution.
Hi Tim,
The formula is shown below;
@Anonymous
Try use this measure, you can use today's month and then -1.
Hi Serdet,
You can use this:
CountDaysLastMonth = CALCULATE(DISTINCTCOUNT(DimDate[Date]), PREVIOUSMONTH(DimDate[Date]))best regards,
Tim
Proud to be a Super User!
Hi Tim
I have tried your measure and have received 'blank' in my card visual. I am using the measure by replacing dimdate[date] with my date column. Is this the correct approach?
Thanks
E
Hi Serdet,
Yes that's correct. Could you perhaps share your formula and a sample of your date table data?
regards,
Tim
Proud to be a Super User!
Hi Tim,
The formula is shown below;
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 34 | |
| 31 | |
| 25 | |
| 20 | |
| 16 |
| User | Count |
|---|---|
| 60 | |
| 48 | |
| 29 | |
| 23 | |
| 23 |