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! 🙂
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
25 | |
18 | |
17 | |
17 | |
16 |
User | Count |
---|---|
27 | |
26 | |
18 | |
15 | |
14 |