I'm new in powerbi. My question is: Can I select (filter) rows in powerbi visual, by min(value) from a variable in a group? For example I have a dataset:
row_id | group_1 | var | group_2 |
1 | A | 1.1 | X |
2 | A | 1.2 | Y |
3 | A | 0.9 | Z |
4 | B | 0.5 | X |
5 | B | 0.7 | Z |
6 | C | 1 | X |
7 | D | 2 | X |
Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
I'm new in powerbi. My question is: Can I select (filter) rows in powerbi visual, by min(value) from a variable in a group? For example I have a dataset:
row_id | group_1 | var | group_2 |
1 | A | 1.1 | X |
2 | A | 1.2 | Y |
3 | A | 0.9 | Z |
4 | B | 0.5 | X |
5 | B | 0.7 | Z |
6 | C | 1 | X |
7 | D | 2 | X |
In R language I can do it with
dataset<-dataset %>%group_by(group_1)%>%dplyr::slice(which.min(var))
Hello, @pedrof
Depending on your description, I created data to reproduce your scenario. The pbix file is attached at the end.
mesa:
You can create a measure as follows.
Visual Control =
var _min =
CALCULATE(
MIN('Table'[var]),
ALLEXCEPT('Table','Table'[group_1])
)
return
IF(
SUM('Table'[var])=_min,
1,0
)
You must then place the measure in the visual level filter to filter the result.
Best regards
Allan
If this post helps, consider ACCEPT as the solution to help other members find it faster.
Hello, @pedrof
Depending on your description, I created data to reproduce your scenario. The pbix file is attached at the end.
mesa:
You can create a measure as follows.
Visual Control =
var _min =
CALCULATE(
MIN('Table'[var]),
ALLEXCEPT('Table','Table'[group_1])
)
return
IF(
SUM('Table'[var])=_min,
1,0
)
You must then place the measure in the visual level filter to filter the result.
Best regards
Allan
If this post helps, consider ACCEPT as the solution to help other members find it faster.
Hello, @pedrof
Depending on your description, I created data to reproduce your scenario. The pbix file is attached at the end.
mesa:
You can create a measure as follows.
Visual Control =
var _min =
CALCULATE(
MIN('Table'[var]),
ALLEXCEPT('Table','Table'[group_1])
)
return
IF(
SUM('Table'[var])=_min,
1,0
)
You must then place the measure in the visual level filter to filter the result.
Best regards
Allan
If this post helps, consider ACCEPT as the solution to help other members find it faster.
Hello, @pedrof
Depending on your description, I created data to reproduce your scenario. The pbix file is attached at the end.
mesa:
You can create a measure as follows.
Visual Control =
var _min =
CALCULATE(
MIN('Table'[var]),
ALLEXCEPT('Table','Table'[group_1])
)
return
IF(
SUM('Table'[var])=_min,
1,0
)
You must then place the measure in the visual level filter to filter the result.
Best regards
Allan
If this post helps, consider ACCEPT as the solution to help other members find it faster.
Hello, @pedrof
Depending on your description, I created data to reproduce your scenario. The pbix file is attached at the end.
mesa:
You can create a measure as follows.
Visual Control =
var _min =
CALCULATE(
MIN('Table'[var]),
ALLEXCEPT('Table','Table'[group_1])
)
return
IF(
SUM('Table'[var])=_min,
1,0
)
You must then place the measure in the visual level filter to filter the result.
Best regards
Allan
If this post helps, consider ACCEPT as the solution to help other members find it faster.
Hello, @pedrof
Depending on your description, I created data to reproduce your scenario. The pbix file is attached at the end.
mesa:
You can create a measure as follows.
Visual Control =
var _min =
CALCULATE(
MIN('Table'[var]),
ALLEXCEPT('Table','Table'[group_1])
)
return
IF(
SUM('Table'[var])=_min,
1,0
)
You must then place the measure in the visual level filter to filter the result.
Best regards
Allan
If this post helps, consider ACCEPT as the solution to help other members find it faster.
Hello, @pedrof
Depending on your description, I created data to reproduce your scenario. The pbix file is attached at the end.
mesa:
You can create a measure as follows.
Visual Control =
var _min =
CALCULATE(
MIN('Table'[var]),
ALLEXCEPT('Table','Table'[group_1])
)
return
IF(
SUM('Table'[var])=_min,
1,0
)
You must then place the measure in the visual level filter to filter the result.
Best regards
Allan
If this post helps, consider ACCEPT as the solution to help other members find it faster.
Hello, @pedrof
Depending on your description, I created data to reproduce your scenario. The pbix file is attached at the end.
mesa:
You can create a measure as follows.
Visual Control =
var _min =
CALCULATE(
MIN('Table'[var]),
ALLEXCEPT('Table','Table'[group_1])
)
return
IF(
SUM('Table'[var])=_min,
1,0
)
You must then place the measure in the visual level filter to filter the result.
Best regards
Allan
If this post helps, consider ACCEPT as the solution to help other members find it faster.
Hello, @pedrof
Depending on your description, I created data to reproduce your scenario. The pbix file is attached at the end.
mesa:
You can create a measure as follows.
Visual Control =
var _min =
CALCULATE(
MIN('Table'[var]),
ALLEXCEPT('Table','Table'[group_1])
)
return
IF(
SUM('Table'[var])=_min,
1,0
)
You must then place the measure in the visual level filter to filter the result.
Best regards
Allan
If this post helps, consider ACCEPT as the solution to help other members find it faster.
Hello, @pedrof
Depending on your description, I created data to reproduce your scenario. The pbix file is attached at the end.
mesa:
You can create a measure as follows.
Visual Control =
var _min =
CALCULATE(
MIN('Table'[var]),
ALLEXCEPT('Table','Table'[group_1])
)
return
IF(
SUM('Table'[var])=_min,
1,0
)
You must then place the measure in the visual level filter to filter the result.
Best regards
Allan
If this post helps, consider ACCEPT as the solution to help other members find it faster.
Hello, @pedrof
Depending on your description, I created data to reproduce your scenario. The pbix file is attached at the end.
mesa:
You can create a measure as follows.
Visual Control =
var _min =
CALCULATE(
MIN('Table'[var]),
ALLEXCEPT('Table','Table'[group_1])
)
return
IF(
SUM('Table'[var])=_min,
1,0
)
You must then place the measure in the visual level filter to filter the result.
Best regards
Allan
If this post helps, consider ACCEPT as the solution to help other members find it faster.
Hello, @pedrof
Depending on your description, I created data to reproduce your scenario. The pbix file is attached at the end.
mesa:
You can create a measure as follows.
Visual Control =
var _min =
CALCULATE(
MIN('Table'[var]),
ALLEXCEPT('Table','Table'[group_1])
)
return
IF(
SUM('Table'[var])=_min,
1,0
)
You must then place the measure in the visual level filter to filter the result.
Best regards
Allan
If this post helps, consider ACCEPT as the solution to help other members find it faster.
Hello, @pedrof
Depending on your description, I created data to reproduce your scenario. The pbix file is attached at the end.
mesa:
You can create a measure as follows.
Visual Control =
var _min =
CALCULATE(
MIN('Table'[var]),
ALLEXCEPT('Table','Table'[group_1])
)
return
IF(
SUM('Table'[var])=_min,
1,0
)
You must then place the measure in the visual level filter to filter the result.
Best regards
Allan
If this post helps, consider ACCEPT as the solution to help other members find it faster.
Hello, @pedrof
Depending on your description, I created data to reproduce your scenario. The pbix file is attached at the end.
mesa:
You can create a measure as follows.
Visual Control =
var _min =
CALCULATE(
MIN('Table'[var]),
ALLEXCEPT('Table','Table'[group_1])
)
return
IF(
SUM('Table'[var])=_min,
1,0
)
You must then place the measure in the visual level filter to filter the result.
Best regards
Allan
If this post helps, consider ACCEPT as the solution to help other members find it faster.
Hello, @pedrof
Depending on your description, I created data to reproduce your scenario. The pbix file is attached at the end.
mesa:
You can create a measure as follows.
Visual Control =
var _min =
CALCULATE(
MIN('Table'[var]),
ALLEXCEPT('Table','Table'[group_1])
)
return
IF(
SUM('Table'[var])=_min,
1,0
)
You must then place the measure in the visual level filter to filter the result.
Best regards
Allan
If this post helps, consider ACCEPT as the solution to help other members find it faster.
Hello, @pedrof
Depending on your description, I created data to reproduce your scenario. The pbix file is attached at the end.
mesa:
You can create a measure as follows.
Visual Control =
var _min =
CALCULATE(
MIN('Table'[var]),
ALLEXCEPT('Table','Table'[group_1])
)
return
IF(
SUM('Table'[var])=_min,
1,0
)
You must then place the measure in the visual level filter to filter the result.
Best regards
Allan
If this post helps, consider ACCEPT as the solution to help other members find it faster.
Hello, @pedrof
Depending on your description, I created data to reproduce your scenario. The pbix file is attached at the end.
mesa:
You can create a measure as follows.
Visual Control =
var _min =
CALCULATE(
MIN('Table'[var]),
ALLEXCEPT('Table','Table'[group_1])
)
return
IF(
SUM('Table'[var])=_min,
1,0
)
You must then place the measure in the visual level filter to filter the result.
Best regards
Allan
If this post helps, consider ACCEPT as the solution to help other members find it faster.
Hello, @pedrof
Depending on your description, I created data to reproduce your scenario. The pbix file is attached at the end.
mesa:
You can create a measure as follows.
Visual Control =
var _min =
CALCULATE(
MIN('Table'[var]),
ALLEXCEPT('Table','Table'[group_1])
)
return
IF(
SUM('Table'[var])=_min,
1,0
)
You must then place the measure in the visual level filter to filter the result.
Best regards
Allan
If this post helps, consider ACCEPT as the solution to help other members find it faster.
Hello, @pedrof
Depending on your description, I created data to reproduce your scenario. The pbix file is attached at the end.
mesa:
You can create a measure as follows.
Visual Control =
var _min =
CALCULATE(
MIN('Table'[var]),
ALLEXCEPT('Table','Table'[group_1])
)
return
IF(
SUM('Table'[var])=_min,
1,0
)
You must then place the measure in the visual level filter to filter the result.
Best regards
Allan
If this post helps, consider ACCEPT as the solution to help other members find it faster.
Hello, @pedrof
Depending on your description, I created data to reproduce your scenario. The pbix file is attached at the end.
mesa:
You can create a measure as follows.
Visual Control =
var _min =
CALCULATE(
MIN('Table'[var]),
ALLEXCEPT('Table','Table'[group_1])
)
return
IF(
SUM('Table'[var])=_min,
1,0
)
You must then place the measure in the visual level filter to filter the result.
Best regards
Allan
If this post helps, consider ACCEPT as the solution to help other members find it faster.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.