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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi All,
I would like to create a matrix where one measure will be displayed only for one row [name], so I have 4 different measures in 4 rows:
Matrix
Dates.... | |
Row for Name A | Values for Measure 1 |
Row for Name B | Values for Measure 2 |
Row for Name C | Values for Measure 3 |
Row for Name D | Values for Measure 4 |
I am able to do it with SWITCH() and SELECTEDVALUE() functions, but it does not work exactly as I want it to.
When I put TRUE() as first argument in SWITCH() function, it only shows 2 rows and when I change it to FALSE() it shows to other rows.
Here is a formula I use:
Selected ES code =
SWITCH(
TRUE(),
SELECTEDVALUE('Table1'[NamesColumn]) == "Name A", [Measure 1],
SELECTEDVALUE('Table1'[NamesColumn]) == "Name B", [Measure 2],
SELECTEDVALUE('Table1'[NamesColumn]) == "Name C", [Measure 3],
SELECTEDVALUE('Table1'[NamesColumn) == "Name D", [Measure 2],
BLANK()
)
Can anybody help?
@tomaszes19 , Assuming Namescolumn is used in visual
try like
Selected ES code =
Sumx(Values('Table1'[NamesColumn), calculate(
SWITCH(
TRUE(),
max('Table1'[NamesColumn]) = "Name A", [Measure 1],
max('Table1'[NamesColumn]) = "Name B", [Measure 2],
max('Table1'[NamesColumn]) = "Name C", [Measure 3],
max('Table1'[NamesColumn) = "Name D", [Measure 2],
BLANK()
) ))
It turned out I made a mistake in the called measures... Sorry and thank you for your time!
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.