cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Shalin Frequent Visitor
Frequent Visitor

Need some help creating a new Sales Inc VAT column

Hi all,

 

I am having some trouble making a new column in my table, which shows sales including VAT, but is dependent on currency

 

The columns I have are:

Lineamount - showing the amount per invoice line, ex VAT

Currencycode - showing the currency on that line

Organizationname - showing the name of the company

Warehousefiltercode2 - an unfortunately named column, which shows product group

 

Ideally, I would like to be able to show a matrix which likes like this (hopefully the picture I attached appears here...): Capture1.PNG

 

Which shows sales by Company, by product group, with 2 columns: Ex VAT and Inc VAT. 

The matrix part of it is fine, I've done that. 

 

What I want to be able to do (and am struggling with the forumla to do so) is create a new column which is 20% more than the Ex VAT column. As you can see above, currently it does not work. The additional complication is that some customers are in USD/EUR, where there is no VAT. 

So in essence the column needs to look at the currency column, see if it is GBP, and if it is, multiply by 1.2. If it isn't multiply by 1.

If this was excel I would do some sort of nested IF Vlookup, not sure how to do it in DAX.

 

Below is some sample data

 

OrganizationnameCurrencycodeWarehousefiltercode2Lineamount
AlphaGBPEFF           147.20
AlphaGBPEAF       3,792.00
AlphaGBPEOF           354.00
AlphaGBPADB       6,742.00
BravoUSDEAF           375.00
BravoUSDEOF           153.48
CharlieEUREOF             92.70
CharlieEURADB       1,278.60

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Super User IV
Super User IV

Re: Need some help creating a new Sales Inc VAT column

Not sure I understand everything completely here but if you have your last table that you posted then you could create a column like:

 

Column = 
SWITCH([Currencycode],
"GBP",[Lineamount] * 1.2,
"EUR",[Lineamount] * 1.2,
[Lineamount]*1
)

I have book! Learn Power BI from Packt


Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

View solution in original post

1 REPLY 1
Super User IV
Super User IV

Re: Need some help creating a new Sales Inc VAT column

Not sure I understand everything completely here but if you have your last table that you posted then you could create a column like:

 

Column = 
SWITCH([Currencycode],
"GBP",[Lineamount] * 1.2,
"EUR",[Lineamount] * 1.2,
[Lineamount]*1
)

I have book! Learn Power BI from Packt


Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

View solution in original post

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

January 2020 Community Highlights

January 2020 Community Highlights

Make sure you didn't miss any of the things that happened in the community in January!

Top Solution Authors