Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hello Good People!
Can you help to figure out how to create the Min Value in a column - taking the small value of a data?
Example: In Soccer Value: 2 - In Baseball Value: (repeated in all rows the last Value)
Sport | Value |
Socccer | 2 |
Socccer | 3 |
Socccer | 4 |
Socccer | 4 |
Baseball | 4 |
Baseball | 4 |
Baseball | 1 |
Baseball | 3 |
Baseball | 6 |
Solved! Go to Solution.
Hi @AllanArayita ,
The Table data is shown below:
Please follow these steps:
1.Add an index column after grouping by column 'Sport' in Power query.
Table.AddIndexColumn([Count],"Index",1)
2.Use the following DAX expression to create a column
Column =
SWITCH(TRUE(),
[Sport] = "Socccer", CALCULATE(MIN('Table'[Value]),ALLEXCEPT('Table','Table'[Sport])),
[Sport] = "Baseball",
VAR _maxIndex = CALCULATE(MAX('Table'[Index]),ALLEXCEPT('Table','Table'[Sport]))
RETURN CALCULATE(MAXX(FILTER('Table',[Index] = _maxIndex),[Value]),ALLEXCEPT('Table','Table'[Sport]))
)
3.Final output
Best Regards,
Wenbin Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @AllanArayita ,
The Table data is shown below:
Please follow these steps:
1.Add an index column after grouping by column 'Sport' in Power query.
Table.AddIndexColumn([Count],"Index",1)
2.Use the following DAX expression to create a column
Column =
SWITCH(TRUE(),
[Sport] = "Socccer", CALCULATE(MIN('Table'[Value]),ALLEXCEPT('Table','Table'[Sport])),
[Sport] = "Baseball",
VAR _maxIndex = CALCULATE(MAX('Table'[Index]),ALLEXCEPT('Table','Table'[Sport]))
RETURN CALCULATE(MAXX(FILTER('Table',[Index] = _maxIndex),[Value]),ALLEXCEPT('Table','Table'[Sport]))
)
3.Final output
Best Regards,
Wenbin Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.