Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello Team,
I am trying to create a measure, which filters a sum from 27.12.2022 to < today (i,e) 26.01.2023. Start date is constant but End date should auto update daily to < today.
My measure as follows
Solved! Go to Solution.
Hi, @Karthik12
You can try the following methods.
Test MTD sum =
CALCULATE (
SUM ( 'mis monthly_plan'[plan] ),
FILTER (
'mis monthly_plan',
'mis monthly_plan'[date] > DATE ( 2023, 1, 1 )
&& 'mis monthly_plan'[date] < TODAY ()
)
)
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Karthik12
You can try the following methods.
Test MTD sum =
CALCULATE (
SUM ( 'mis monthly_plan'[plan] ),
FILTER (
'mis monthly_plan',
'mis monthly_plan'[date] > DATE ( 2023, 1, 1 )
&& 'mis monthly_plan'[date] < TODAY ()
)
)
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hey @Karthik12 ,
I recommend reading this article as it contains almost everything about date/datetime calculations: Time patterns – DAX Patterns
I also recommend using a dedicated calendar table, how to create this table and why it's considered a best practice is also explained in the article.
Regards,
Tom
@TomMartens Thanks. I go through the topics. It quite useful to me for further learning.
Still, am searching for the best solution to my problem.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
97 | |
96 | |
81 | |
74 | |
66 |
User | Count |
---|---|
129 | |
106 | |
106 | |
86 | |
72 |