Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
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
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 48 | |
| 46 | |
| 41 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 69 | |
| 67 | |
| 32 | |
| 27 | |
| 26 |