The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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! 🙂
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
21 | |
19 | |
18 | |
16 | |
13 |
User | Count |
---|---|
38 | |
38 | |
23 | |
21 | |
17 |