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.
Hello,
here's my situation : depending on user selection on a segment, I want to create a table that selects either the column1, either column2
Table =
var user_choice = [sel] --= selectedvalue of a segment menu
return
if (user_choice="a",
SELECTCOLUMNS(
data,"id",data[id],"DATA_LIB", data[COLONNE1],"VALUE",data[VALEUR])
,--else if = b
SELECTCOLUMNS(
data,"id",data[id],"DATA_LIB", data[COLONNE2],"VALUE",data[VALEUR])
)
It's not working. Is it normal ?
Aim : I'd like to change my column reference in my bar charts depending the situation
(Today I duplicate the vizualiation and change the field)
Thanks !
Solved! Go to Solution.
looks ok. You might be interested in this video
Great ! Thanks !
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 |
|---|---|
| 79 | |
| 38 | |
| 31 | |
| 27 | |
| 27 |