Forum Discussion
prat_daxer
4 years agoNew Member
Assigning a column value based on other column
I have data something like this: Catagory value final value A 1 1 A 2 1 B 2 2 B 3 2 B 4 2 Basically number 1,2,3,4 are priority and if any atagory has prio 1 also 2...
pi_eye
Resolver IV
4 years agoIt sounds like you are just trying to get the min of each group /category is that right?
You'll need an expression like
GroupMin = calculate(min('Table'[Value]), ALLEXCEPT('Table','Table'[Cat]))
Calculate will give you the min, the first parameter calculation, and the context is specified in the second paramter, AllExcept. In this case the context "all except" tells DAX to return all values in the table, ie, ignore all groupings per row, except the cat grouping.
This gives:
Pi