Forum Discussion
Distinct value from multiple columns
- Anonymous6 years ago
Use a selectcolumns to filter out only the columns that you need
Budget Rate by Variety = MAXX(DISTINCT( SELECTCOLUMNS('Variety Budget Data';"Variety";'Variety Budget Data'[Variety];"Shift";'Variety Budget Data'[Shift])), MAX('Variety Budget Data'[Rate Per Hour]))SELECTCOLUMNS allows you to filter out only the columns that you need
There are other solutions, btw
Use a selectcolumns to filter out only the columns that you need
Budget Rate by Variety = MAXX(DISTINCT(
SELECTCOLUMNS('Variety Budget Data';"Variety";'Variety Budget Data'[Variety];"Shift";'Variety Budget Data'[Shift])), MAX('Variety Budget Data'[Rate Per Hour]))
SELECTCOLUMNS allows you to filter out only the columns that you need
There are other solutions, btw
- Anonymous6 years agoNot applicable
Hi Anonymous
Thank you for the reply. I think the formula works, though my Power BI model is giving me headaches as I cannot get the relationships to work.
Thanks again
- Anonymous6 years agoNot applicable
Hi Anonymous
Would there be a better function rather than using "MAX"? Would sumx be better as it would take the row context?
- Anonymous6 years agoNot applicable
Hi,
MAX and SUMX are two very different functions. But even MAXX and MAX are very different.
In this specific case you can't use SUMX as it takes a table, rather than a column like MAX.Unfortunately without seeing the model I can't be of more help.