Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! 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;
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 51 | |
| 40 | |
| 37 | |
| 14 | |
| 14 |
| User | Count |
|---|---|
| 84 | |
| 71 | |
| 38 | |
| 29 | |
| 27 |