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!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
I want to use this EXCEL formula in Power BI
"=IF(O2>0,O2*M2,M2)" or "=IF(P2>0,J2*P2,"")"
So lets say O2 & P2 are "Quanities" M2 & J2 are "Units"
I want to make sure that those number value are greater than 0, then "quanity*Unit"
I'm not sure if I should be using the IF function in this scenario in Power Query or CALCULATE measure with a FILTER?
Thanks for the help
Solved! Go to Solution.
Hi @SteelChampzz,
AFAIK, the current power bi data model table does not include the row and column index.
So if you want to calculate with specific row records, please add an index field in the table as a condition to help DAX expressions find the corresponding records to calculate.
Add an index column (Power Query) (microsoft.com)
If you only mean to calculate values based on condition, you can add a calculated column to the table:
Column formula =
IF ( Table[Column1] > 0, Table[Column1] * Table[Column2], Table[Column2] )
BTW, current power bi does not support creating dynamic calculated columns/tables based on filter effect. They are working on different levels and you can't use the child level to affect their parent.
Regards,
Xiaxoin Sheng
Hi @SteelChampzz,
AFAIK, the current power bi data model table does not include the row and column index.
So if you want to calculate with specific row records, please add an index field in the table as a condition to help DAX expressions find the corresponding records to calculate.
Add an index column (Power Query) (microsoft.com)
If you only mean to calculate values based on condition, you can add a calculated column to the table:
Column formula =
IF ( Table[Column1] > 0, Table[Column1] * Table[Column2], Table[Column2] )
BTW, current power bi does not support creating dynamic calculated columns/tables based on filter effect. They are working on different levels and you can't use the child level to affect their parent.
Regards,
Xiaxoin Sheng
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 |
|---|---|
| 60 | |
| 53 | |
| 40 | |
| 15 | |
| 14 |
| User | Count |
|---|---|
| 97 | |
| 81 | |
| 35 | |
| 29 | |
| 25 |