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.
I am looking to create a variable called DIFF that is set to a specific number based on the value of a text string called STATUS. Basically -
If STATUS=Submitted then DIFF=14
or
If STATUS=Active then DIFF=21
or
If STATUS=OnHold then DIFF=28
What would be the syntax for this? Thanks in advance.
Solved! Go to Solution.
Var diff =
Switch(
Selectedvalue( table[status] ),
"Submitted", 14,
"Active", 21,
"On hold", 28
)
Var diff =
Switch(
Selectedvalue( table[status] ),
"Submitted", 14,
"Active", 21,
"On hold", 28
)
Worked 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 September 2025 Power BI update to learn about new features.