Forum Discussion
DanielSagaon
6 years agoFrequent Visitor
Last row value
Hello! I would like your help. I am looking to find the last row value per Product. How can I archive that using DAX: I want the column desirable result, is the last value from the last row: ...
- 6 years ago
Hi DanielSagaon
I assume this is a calculated column. If so:
NewCol = VAR PreviousDate_ = CALCULATE ( MAX ( Table1[Week] ), Table1[Week] < EARLIER ( Table1[Week] ), ALLEXCEPT ( Table1, Table1[Product] ) ) RETURN IF ( ISBLANK ( PreviousDate_ ), Table1[Score], CALCULATE ( DISTINCT ( Table1[Score] ), Table1[Week] = PreviousDate_, ALLEXCEPT ( Table1, Table1[Product] ) ) )Please mark the question solved when done and consider giving kudos if posts are helpful.
Cheers

AlB
6 years agoCommunity Champion
Hi DanielSagaon
I assume this is a calculated column. If so:
NewCol =
VAR PreviousDate_ =
CALCULATE (
MAX ( Table1[Week] ),
Table1[Week] < EARLIER ( Table1[Week] ),
ALLEXCEPT ( Table1, Table1[Product] )
)
RETURN
IF (
ISBLANK ( PreviousDate_ ),
Table1[Score],
CALCULATE (
DISTINCT ( Table1[Score] ),
Table1[Week] = PreviousDate_,
ALLEXCEPT ( Table1, Table1[Product] )
)
)
Please mark the question solved when done and consider giving kudos if posts are helpful.
Cheers ![]()
- DanielSagaon6 years agoFrequent Visitor
Hi!! Thank you so much!! this is exactly what I was looking for!!!!
Really helpful!!
Thank you!!