The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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!
User | Count |
---|---|
26 | |
10 | |
8 | |
6 | |
6 |
User | Count |
---|---|
32 | |
14 | |
11 | |
10 | |
9 |