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! It's time to submit your entry. Live 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
| User | Count |
|---|---|
| 49 | |
| 37 | |
| 33 | |
| 22 | |
| 18 |
| User | Count |
|---|---|
| 132 | |
| 99 | |
| 56 | |
| 37 | |
| 37 |