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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 38 | |
| 37 | |
| 28 | |
| 28 |
| User | Count |
|---|---|
| 124 | |
| 89 | |
| 73 | |
| 66 | |
| 65 |