Forum Discussion
laciodrom_80
Helper IV
5 years agoHint about DAX calculation
Hi all, I've got a table with a string column Customer, a number column Revision and a number column Price: I wish to sum all values in Price column but only considering the max revision value for t...
- 5 years ago
Hi laciodrom_80 ,
Would you please use the following measure ?
Measure = SUMX(ADDCOLUMNS(SUMMARIZE('Table','Table'[CUSTOMER],"maxrevision",MAX('Table'[REVISION])),"_price",CALCULATE(MAX('Table'[Price]))),[_price])If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
laciodrom_80
Helper IV
5 years agoamitchandak thanks, but I've modified the post in the meantime, it's a bit different
amitchandak
Super User
5 years agolaciodrom_80 , Try like
sumx(values(Table[CUSTOMER]) ,lastnonblankvalue(table[revision ],max(Table[price])))
In visual take max or last of revision, if needed