Forum Discussion
Help with Expression
- 6 years ago
Hi antoniodneto ,
You can create this measure:
Measure = VAR _max = CALCULATE ( MAX ( 'Table'[date] ), ALLSELECTED ( 'Table'[date] ) ) RETURN IF ( ISFILTERED ( 'Table'[date] ), IF ( _max IN DISTINCT ( 'Table'[date_sell] ), CALCULATE ( SUM ( 'Table'[value] ), FILTER ( ALL ( 'Table' ), 'Table'[date_sell] = MAX ( 'Table'[date_sell] ) ) ) ), SUM ( 'Table'[value] ) )no date is selectedselected date
Attached a sample file that hopes to help you: Help with Expression.pbix
Best Regards,
Yingjie LiIf this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Hi, IT WORKED!!!
Just one thing, when I select month by month return me correct. But when not month is selected it shows me the value for max date_sell, in this case should accumulated. Can I add that?
Tks a lot!!!
Hi antoniodneto ,
Not very clear , but it accumulates the value of the max_date sell.
I think this is what you want.
Let me know if this help.
Also, pls accept as solution for other community members to benefit.
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)