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! Don't miss your chance! Learn more
Actually this is working for my conditon "VIEW_FORECASTREVENUE[COMMODITY] = "Electric" but for all other units it is giving me wrong result. Even if the commodity is different I'm getting values instead of 0.
I have to commodity i.e Electric and Gas but when I'm using the above formula for one commodity its giving output for another commodity as well which should not be the case
| Usage | Commodity | Unit | Current output: Unit(Kwh) | Correct output desired |
| 2346 | Electric | Kwh | 2346 | 2346 |
| 2289 | Electric | mWh | 2289000 | 2289000 |
| 2364 | Gas | DTH | 2364 | 0 |
| 2364 | Electric | mWh | 2364000 | 2364000 |
| 2499 | Gas | DTH | 2499 | 0 |
Solved! Go to Solution.
@Anonymous , Try a new column like
Switch ( true()
[Unit] = "Kwh" ,[Usage],
[Unit] = "mWh" ,[Usage]*1000,
blank()
)
Thanks !!!
It worked for all the conditions, just applied a filter with it and everything is working fine now.
Thanks for the help !!!
Regards
Getting the below error
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 68 | |
| 59 | |
| 48 | |
| 20 | |
| 16 |
| User | Count |
|---|---|
| 107 | |
| 106 | |
| 39 | |
| 27 | |
| 27 |