Forum Discussion
Multiple Two Columns then return an IF statement
- Anonymous3 years ago
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