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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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!
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!