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.
How to pick a column in a table based on a slicer.
lets say I have this table
Prod Type | prod | Quality | Rating | QualityRate | Date |
ProdType1 | prod1 | Good | 6 | 6 | 6/1/2021 |
ProdType1 | prod2 | Bad | 2 | 2 | 6/20/2021 |
ProdType1 | prod3 | Okay | 2 | 5/25/2021 | |
ProdType2 | prod4 | Good | 6 | 6/1/2021 | |
ProdType3 | prod5 | Bad | 2 | 6/1/2021 | |
ProdType1 | prod6 | Okay | 6 | 5/25/2021 | |
ProdType2 | prod7 | Okay | 6 | 6/1/2021 | |
ProdType3 | prod8 | Okay | 5 | 6/20/2021 | |
ProdType1 | prod9 | Okay | 5 | 5/25/2021 | |
ProdType2 | prod10 | Okay | 6 | 6/1/2021 | |
ProdType3 | prod11 | Good | 3 | 7 | 6/20/2021 |
ProdType3 | prod12 | Good | 3 | 5/25/2021 |
and I have a slicer that will have the selection of the product type, and I have a table that will dynamiclly change
if I select prodType3 it will show me the average of the [quality rate] column
but if I pick any other product I get just the average or [Rating]
How can I approach that?
Solved! Go to Solution.
@SamOvermars Maybe:
Measure =
VAR __ProdType = SELECTEDVALUE('Table'[Prod Type])
RETURN
IF(__ProdType = "ProdType3",AVERAGE('Table'[Quality Rate]),AVERAGE('Table'[Rating]))
@SamOvermars Maybe:
Measure =
VAR __ProdType = SELECTEDVALUE('Table'[Prod Type])
RETURN
IF(__ProdType = "ProdType3",AVERAGE('Table'[Quality Rate]),AVERAGE('Table'[Rating]))
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.
User | Count |
---|---|
85 | |
42 | |
30 | |
27 | |
26 |