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!View all the Fabric Data Days sessions on demand. View schedule
No. of Breaches Last Month = CALCULATE(
COUNTROWS(Breaches),
PREVIOUSMONTH('Fiscal Calendar'[Date])
)Hi All
I am trying to calculate the number of rows in my table for last month only using a measure.
My DAX above is returning Blank, when there is a number
Any obvious error?
Thx in advance!
Solved! Go to Solution.
HI @ajay_gajree ,
You can try to use date function to manually defined date range filter instead to use time intelligence functions.
Time Intelligence "The Hard Way" (TITHW)
Regards,
Xiaoxin Sheng
HI @ajay_gajree ,
You can try to use date function to manually defined date range filter instead to use time intelligence functions.
Time Intelligence "The Hard Way" (TITHW)
Regards,
Xiaoxin Sheng
@ajay_gajree - PREVIOUSMONTH needs to have an input (filter context). If you put your calculation into a table with months, No. of Breaches in Month (straight COUNTROWS calculation) and No. of Breaches Last Month, you will be able to compare the values.
If you want to see the value in a card, you will need to filter/slice the page to the current month.
Hope this helps,
Nathan
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!