cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
Super User

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
Super User

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
Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 55 members 1,042 guests
Please welcome our newest community members: