March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi Community!
I am looking to see if anyone could help me with a dax formula to ignore a Page date filter.
The outcome would be, no matter what page date filter is set, the formula would still result in sales MTD.
Example:
MTD Total Sales =
TOTALMTD( [total sales], ALL(calendar[date]))
Thank you so much!
Christina 🙂
Solved! Go to Solution.
Do you want to show MTD sales as at "today" as returned by TODAY() function?
I would typically write something like this:
MTD Total Sales =
CALCULATE (
[total sales],
DATESMTD ( 'calendar'[date] = TODAY () )
)
As long as your calendar table is marked as a date table, this should work fine.
Please post back if you were looking for something different or this doesn't work for you.
Regards
Do you want to show MTD sales as at "today" as returned by TODAY() function?
I would typically write something like this:
MTD Total Sales =
CALCULATE (
[total sales],
DATESMTD ( 'calendar'[date] = TODAY () )
)
As long as your calendar table is marked as a date table, this should work fine.
Please post back if you were looking for something different or this doesn't work for you.
Regards
Hi @OwenAuger ,
I'm not sure why, but recently this formula stopped working.
This is what it shows:
When I add the formula to the table - the table only shows column headers, but the data is blank. Any ideas?
Thank you!!
Christina
Hi @christina4444 ,
That's interesting - here a some suggestions to debug:
One other minor point (probably not related to the current issue): 'Calendar' should be enclosed in single quotes since it's a reserved word (a function name). You can get away with it sometimes but I would do this as a safeguard:
MTD Invoices =
CALCULATE (
[Total Invoices],
DATESMTD ( 'Calendar'[Date] = TODAY () )
)
Let me know if any of the above help! 🙂
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
23 | |
16 | |
15 | |
7 | |
6 |
User | Count |
---|---|
33 | |
29 | |
16 | |
13 | |
12 |