Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request 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.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 5 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 16 | |
| 8 | |
| 7 | |
| 7 |