Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
Toby001
Regular Visitor

Create simple DAX measure ..

Dear community,
Being a power bi beginner, I am struggling to setup a very simple DAX measure to define 2 icons.
iconMeasure = SWITCH(TRUE(),[SPI]>1,"TriangleHigh","TriangleLow")
SPI is a standard decimal column within a table.
It gives me the error:
The value of SPI could not be evaluated. Either the column doesn't exist or for this column no actual row exists
I appreciate your ideas.
Best Toby
1 ACCEPTED SOLUTION
smpa01
Community Champion
Community Champion

 can you try. You need to pass on scalar value and not a column in SWITCH

SWITCH(TRUE(), MAX(tbl[SPI])....)
or
SWITCH(TRUE(), CALCULATE(MAX(tbl[SPI]))....)

@Toby001

 


========================
Did I answer your question? Mark my post as a solution!
Proud to be a Super User
My Custom Visualization Projects
• Plotting Live Sound: Live Sound
• Beautiful News: Women in Parliament, Energy Mix, Shrinking Armies
• Visual Capitalist: Working Hrs
• Others: Easing Graph, Animated Calendar
MayViz Submissions
• Week 1: View
• Week 2: View
• Week 3: View
• Week 4: View
========================

View solution in original post

2 REPLIES 2
HotChilli
Community Champion
Community Champion

IF there's only 1 case in the SWITCH, use an IF statement.

I think this will give you a clearer error message.

smpa01
Community Champion
Community Champion

 can you try. You need to pass on scalar value and not a column in SWITCH

SWITCH(TRUE(), MAX(tbl[SPI])....)
or
SWITCH(TRUE(), CALCULATE(MAX(tbl[SPI]))....)

@Toby001

 


========================
Did I answer your question? Mark my post as a solution!
Proud to be a Super User
My Custom Visualization Projects
• Plotting Live Sound: Live Sound
• Beautiful News: Women in Parliament, Energy Mix, Shrinking Armies
• Visual Capitalist: Working Hrs
• Others: Easing Graph, Animated Calendar
MayViz Submissions
• Week 1: View
• Week 2: View
• Week 3: View
• Week 4: View
========================

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Users online (930)