Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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!
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
18 | |
7 | |
7 | |
5 | |
5 |
User | Count |
---|---|
25 | |
10 | |
10 | |
9 | |
6 |