Forum Discussion
tdrp
4 years agoFrequent Visitor
Create filtered table based on max value
Hi, have been using Power BI for a while and I'm trying to get better in DAX I have a problem that I'm trying to solve for months ( have a working solution in power query but the query update is ...
- 4 years ago
I am a bit short of time to test this.
Can you use this and test it please?
TableX = VAR _tab = ADDCOLUMNS(TableY, "MaxTot", CALCULATE(MAX(TableY[TOTAL]), ALLEXCEPT(TableY, TableY[Emp], TableY[Data], TableY[Numero]))) RETURN FILTER(_tab, TableY[TOTAL] = [MaxTot])
HotChilli
4 years agoCommunity Champion
"returns the row that have the max value" Is this from the Total column?
Why is the orange line getting returned (
| 01/12/2020 | 400790 | P44 | 40 | Filipe Leite) |
)
when the Total in the previous line is higher?