Forum Discussion
love
Helper I
8 years agoHow to return min value for different groups of data
Hello. I am working with a set of data simliar to this: TASK CONFIG ID EXPECTED OUTPUT
Task A Config A 1 1
Task A Config A 2 1
Task A Config A 3 1
Task A Config B 4 4
Task A ...
- 8 years ago
HI love
Try this
Column = CALCULATE ( MIN ( TableName[ID] ), ALLEXCEPT ( TableName, TableName[TASK], TableName[CONFIG] ) )
love
Helper I
8 years ago/friendly push :cathappy:
Zubair_Muhammad
Community Champion
8 years agoHI love
Try this
Column =
CALCULATE (
MIN ( TableName[ID] ),
ALLEXCEPT ( TableName, TableName[TASK], TableName[CONFIG] )
)- Zubair_Muhammad8 years ago
Community Champion
- love8 years ago
Helper I
Both of your suggested solutions perfectly meet the requirements in my OP, thank you very much for the uncomplicated and elegand suggestions!
I ended up going for the DAX solution because if I use the "Group by" solution in the query editor the grouping actually removes all lines that do not have the MIN(ID) which is not what I want but I see that I did not make that very clear in my OP.
Thanks again! :smileyhappy: