Forum Discussion
Anonymous
5 years agoNot applicable
Take last version number value
I want to make a report that shows only the value that is evident in the last version (yellow marked). I tried it with the follow DAX expressions: Last Version No = CALCULATE(SUM(Verkaufs...
- 5 years ago
Anonymous
Please try this one:Last Version No M = var __no = MAX(Verkaufsoffertenarchiv[No]) var __maxno = MAXX( FILTER( ALL(Verkaufsoffertenarchiv) , Verkaufsoffertenarchiv[No] = __no ) , Verkaufsoffertenarchiv[Version_No] ) return CALCULATE( SUM(Verkaufsoffertenarchiv[Amount]), Verkaufsoffertenarchiv[Version_No] = __maxno, Verkaufsoffertenarchiv[No] = __no )
Anonymous
5 years agoNot applicable
Fowmy
Super User
5 years agoAnonymous
I created the same scenario and tested.
Last Version No M =
var __no = MAX(Verkaufsoffertenarchiv[No])
var __maxno =
MAXX( ALLEXCEPT( Verkaufsoffertenarchiv , Verkaufsoffertenarchiv[No] ) , Verkaufsoffertenarchiv[Version_No] )
return
CALCULATE(
SUM(Verkaufsoffertenarchiv[Amount]),
Verkaufsoffertenarchiv[Version_No] = __maxno,
Verkaufsoffertenarchiv[No] = __no
)
My Table:
Result:
- Anonymous5 years agoNot applicable
In my tests the result is that it takes the largest version no. and shows the amount just of this No. But it should be that it shows the amount of the largest version no. of every No.
Do you know what I mean?
In your test result it seems to be working... so I do not know what is wrong in my table.- Fowmy5 years ago
Super User
Anonymous
Please try this one:Last Version No M = var __no = MAX(Verkaufsoffertenarchiv[No]) var __maxno = MAXX( FILTER( ALL(Verkaufsoffertenarchiv) , Verkaufsoffertenarchiv[No] = __no ) , Verkaufsoffertenarchiv[Version_No] ) return CALCULATE( SUM(Verkaufsoffertenarchiv[Amount]), Verkaufsoffertenarchiv[Version_No] = __maxno, Verkaufsoffertenarchiv[No] = __no )- Anonymous5 years agoNot applicable
Please excuse the long response time due to vacation absence.
Thanks for the adjustment, so it worked now.
Thanks again - awsome support!