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
Hello,
I have a date table connected to a fact table which only evaluates a measure on a monthly basis. I'd like to see the last non blank value of that measure returned for every date that I add to a table visual.
So for example, I'd like to be able to return 1.068M for 8/10, 8/17, 8/24 and then 1.059M for 9/7, 9/14 and so forth. Any ideas on how I'd achieve this?
Thanks
Solved! Go to Solution.
Hi @rmod32345 ,
You can try formula like below to create measure:
LastNonBlankMeasure =
VAR LastNonBlankDate =
CALCULATE (
MAX ( 'DateTable'[Date] ),
FILTER (
ALL ( 'DateTable' ),
'DateTable'[Date] <= MAX ( 'DateTable'[Date] )
&& NOT ( ISBLANK ( [total_] ) )
)
)
RETURN
CALCULATE (
[total_],
FILTER ( ALL ( 'DateTable' ), 'DateTable'[Date] = LastNonBlankDate )
)
Best Regards,
Adamk Kong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @rmod32345 ,
You can try formula like below to create measure:
LastNonBlankMeasure =
VAR LastNonBlankDate =
CALCULATE (
MAX ( 'DateTable'[Date] ),
FILTER (
ALL ( 'DateTable' ),
'DateTable'[Date] <= MAX ( 'DateTable'[Date] )
&& NOT ( ISBLANK ( [total_] ) )
)
)
RETURN
CALCULATE (
[total_],
FILTER ( ALL ( 'DateTable' ), 'DateTable'[Date] = LastNonBlankDate )
)
Best Regards,
Adamk Kong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@rmod32345 Try this DAX
Would something similar be possible in a measure?
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 |
---|---|
129 | |
90 | |
75 | |
58 | |
53 |
User | Count |
---|---|
200 | |
104 | |
101 | |
67 | |
55 |