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!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live 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;
The Power BI Data Visualization World Championships is back! It's time to submit your entry.
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 56 | |
| 40 | |
| 38 | |
| 21 | |
| 21 |
| User | Count |
|---|---|
| 141 | |
| 103 | |
| 63 | |
| 36 | |
| 35 |