- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

# Need help with column calculation

[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

11-28-2018 04:38 AM - edited 11-28-2018 04:39 AM

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.

Accepted Solutions

## Re: Need help with column calculation

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

11-29-2018 01:03 AM

## Re: Need help with column calculation

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

11-29-2018 01:06 AM

HI, @Nilanka

There is a mistabke in your formula

**VoucherLog[Currency]**)))

Best Regards,

Lin

If this post

**helps**, then please consider

**to help the other members find it more quickly.**

*Accept it as the solution*All Replies

## Re: Need help with column calculation

[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

11-28-2018 05:54 AM - edited 11-28-2018 05:54 AM

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)

## Re: Need help with column calculation

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

11-28-2018 05:57 AM

You can also use an if statement:

Measure = IF([Currency] = "EUR", 9.54 * [Package_Price], IF([Currency] = "DKK", 1.28 * [Package_Price], [Package_Price]))

## Re: Need help with column calculation

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

11-28-2018 06:07 AM

Hi @Nilanka

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

## Re: Need help with column calculation

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

11-28-2018 06:45 AM

"Operator or expression '( )' is not supported in this context."

i got this as a reply , what is my mistake here

## Re: Need help with column calculation

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

11-28-2018 08:49 AM

## Re: Need help with column calculation

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

11-28-2018 10:10 PM

HI, @Nilanka

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

If this post

**helps**, then please consider

**to help the other members find it more quickly.**

*Accept it as the solution*## Re: Need help with column calculation

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

11-29-2018 12:36 AM

Currently trying all , but struggling to get the outcome I want. Will be trying it again , i must have made a mistake somewhere

## Re: Need help with column calculation

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

11-29-2018 12:57 AM

I am still not able to calculate it this is the error i get

## Re: Need help with column calculation

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

11-29-2018 01:03 AM

Change the last VoucherLog[Currency] to VoucherLog[Package Price]