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.
Hello – How can I create a measure to show
Convert column to Text
If Product code = Online or ONLINE return 10 or
else "0"
Tabel Name = Sale
Name | Branch | Product Code | (Measure) Add column and show the value in each row |
ABC Intl | NYC | Online | 10 |
ZZZ Logistics | LON | Offline | 0 |
ABC Intl | CAI | 12 | 0 |
ZZZ Logistics | MEL | Offline | 0 |
ABC Intl | DEL | Online | 10 |
ABC Intl | SHA | ONLINE | 10 |
ABC Intl | NYC | OFFLINE | 0 |
ZZZ Logistics | NYC | 13 | 0 |
Solved! Go to Solution.
@gauravnarchal - This works for me:
Measure =
IF(
SELECTEDVALUE('Table'[Product Code]) = "Online",
10,
0
)
It does seem that from Power Query -> Power BI, "ONLINE" -> "Online" so I didn't have to account for that. Is it different for you?
Proud to be a Super User!
@gauravnarchal - This works for me:
Measure =
IF(
SELECTEDVALUE('Table'[Product Code]) = "Online",
10,
0
)
It does seem that from Power Query -> Power BI, "ONLINE" -> "Online" so I didn't have to account for that. Is it different for you?
Proud to be a Super User!