Forum Discussion
nagaraj007
Post Patron
6 years agoGet Data using Min number
Hello All, I have struck with one problem wherein i would require the result based on 2 conditions, i.e it should search for the minimum number from Rank column and corresponding NAME column it s...
- 6 years ago
You can create an index column and then create a calculate column using dax below:
Result = VAR Min_Rank = CALCULATE(MIN('Table'[Rank]), ALLEXCEPT('Table', 'Table'[Name])) VAR target = CALCULATE(MIN('Table'[Target]), FILTER('Table', 'Table'[Rank] = Min_Rank)) RETURN IF('Table'[Target] = target && 'Table'[Index] = CALCULATE(MIN('Table'[Index]), ALLEXCEPT('Table', 'Table'[Name])), target, BLANK())Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-yuta-msft
Community Support
6 years ago
You can create an index column and then create a calculate column using dax below:
Result =
VAR Min_Rank = CALCULATE(MIN('Table'[Rank]), ALLEXCEPT('Table', 'Table'[Name]))
VAR target = CALCULATE(MIN('Table'[Target]), FILTER('Table', 'Table'[Rank] = Min_Rank))
RETURN
IF('Table'[Target] = target && 'Table'[Index] = CALCULATE(MIN('Table'[Index]), ALLEXCEPT('Table', 'Table'[Name])), target, BLANK())
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.