The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now
I have two columns Package price and Currency. In the Currency column i have 3 difference currencies present NOK , DKK and EUR.
I want the DKK values from Package price to multiplied by 1.28 and EUR to be multipled by 9.54 and NOK remain same.
So I want to create one column with total NOK price.
Bit confused how to do this.
Solved! Go to Solution.
Change the last VoucherLog[Currency] to VoucherLog[Package Price]
HI, @Anonymous
There is a mistabke in your formula
Best Regards,
Lin
Hi @Anonymous
You can also acheive this by using Power Query.
= Table.AddColumn(#"Changed Type", "ExchangeRate", each if [Currency] = "NOK" then 1 else if [Currency] = "DKK" then 1.28 else if [Currency] = "EUR" then 9.45 else null, type number)
If this helped you, please mark this post as an accepted solution and like to give KUDOS .
Regards,
Affan
You can also use an if statement:
Measure = IF([Currency] = "EUR", 9.54 * [Package_Price], IF([Currency] = "DKK", 1.28 * [Package_Price], [Package_Price]))
"Operator or expression '( )' is not supported in this context."
i got this as a reply , what is my mistake here
HI, @Anonymous
Try this formula to add a calculate column
New Package Price = IF ( [Currency] = "EUR", 9.54 * [Package Price], IF ( [Currency] = "DKK", 1.28 * [Package Price], IF ( [Currency] = "NOK", [Package Price] ) ) )
Best Regards,
Lin
I am still not able to calculate it this is the error i get
HI, @Anonymous
There is a mistabke in your formula
Best Regards,
Lin
Change the last VoucherLog[Currency] to VoucherLog[Package Price]
Currently trying all , but struggling to get the outcome I want. Will be trying it again , i must have made a mistake somewhere
You can create the similar measure/Column using the below DAX:
Package Price New = Switch (True(), Currency = "DKK", Package Price*1.28, "EUR", Package price*9,54, Package Price)
Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.
User | Count |
---|---|
158 | |
109 | |
96 | |
83 | |
75 |
User | Count |
---|---|
154 | |
137 | |
131 | |
81 | |
62 |