Forum Discussion
Multiply with difference columns based on a value
- 5 years ago
I have made a calculated column in the Power BI level. If you want to make this in Power Query then write the code like this..
The result will be something like this..
Hi Anonymous ,
Could you please provide some sample data so as to understand it more clearly..?
like this!
- Angith_Nair5 years agoContinued Contributor
Try to unpivot the year columns in Power Query level. After unpivoting the table will look like this..
Then in Power BI try to create a calculated column like this:
Column = IF ( SELECTEDVALUE ( 'Table'[Duration] ) = SELECTEDVALUE ( 'Table'[Year] ), 'Table'[Commission Amount] * 'Table'[Exchange Rate] * 'Table'[Values], 0 )which will give you the result...
If this helps, kindly mark this as a solution. Appreciate with Kuddos. Thank You..
- Anonymous5 years agoNot applicable
Thank you so much for your help! But I can't use IF in the formula...
- Angith_Nair5 years agoContinued Contributor
I have made a calculated column in the Power BI level. If you want to make this in Power Query then write the code like this..
The result will be something like this..