Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Shalin
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
Greg_Deckler
Super User
Super User

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
)

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

1 REPLY 1
Greg_Deckler
Super User
Super User

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
)

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.