Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Sign up nowGet 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.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 63 | |
| 62 | |
| 42 | |
| 20 | |
| 18 |