Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi Guys.
Trying to work out this measure but can't seem to make it work.
So I have the following measure:
Solved! Go to Solution.
azakir,
Personally I would re-write the measure to not use the time intelligence functions, like this:
Measure =
VAR MaxDate = MAX ( 'Calendar'[Calendar Date] )
VAR MinDate = MaxDate - 7
VAR Result =
CALCULATE (
SUM ( Benchmarks[Benchmark Value] ),
'Benchmark Measure'[Benchmark Measure Code] = "BCM",
'Benchmark Type'[Benchmark Type Description] = "Schedule 1MS",
REMOVEFILTERS ( 'Calendar' ),
'Calendar'[Calendar Date] > MinDate,
'Calendar'[Calendar Date] <= MaxDate
)
RETURN Result
I find it's a lot more explicit written this way and easier to debug, for me personally.
If that doesn't work for you, can you please share a sample pbix file? (If you don't know how, please check the pinned thread in the forum.) It would make debugging your issue easier. 🙂
----------------------------------
If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)
P.S. Need a more in-depth consultation for your Power BI data modeling or DAX issues? Feel free to hire me on Upwork or DM me directly on here! I would love to clear up your Power BI headaches.
Proud to be a Super User! | |
azakir,
Personally I would re-write the measure to not use the time intelligence functions, like this:
Measure =
VAR MaxDate = MAX ( 'Calendar'[Calendar Date] )
VAR MinDate = MaxDate - 7
VAR Result =
CALCULATE (
SUM ( Benchmarks[Benchmark Value] ),
'Benchmark Measure'[Benchmark Measure Code] = "BCM",
'Benchmark Type'[Benchmark Type Description] = "Schedule 1MS",
REMOVEFILTERS ( 'Calendar' ),
'Calendar'[Calendar Date] > MinDate,
'Calendar'[Calendar Date] <= MaxDate
)
RETURN Result
I find it's a lot more explicit written this way and easier to debug, for me personally.
If that doesn't work for you, can you please share a sample pbix file? (If you don't know how, please check the pinned thread in the forum.) It would make debugging your issue easier. 🙂
----------------------------------
If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)
P.S. Need a more in-depth consultation for your Power BI data modeling or DAX issues? Feel free to hire me on Upwork or DM me directly on here! I would love to clear up your Power BI headaches.
Proud to be a Super User! | |
Hi @Wilson_ > Thank you so much mate. This formula resolved my issue. Still scratching my head why time intelligence didn't work. But no complains, I'll use this measure of yours. You're a life saver cheers
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
123 | |
78 | |
48 | |
38 | |
37 |
User | Count |
---|---|
196 | |
80 | |
70 | |
51 | |
42 |