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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
AAMW01
Helper I
Helper I

Perform calculation (price / exchange rate) * qty per line filtered by two filters

I need a DAX expression to calculate:

 

CALCULATE(Table1[price] / Table1[exchangeRate]) * Table1[qty]),

FILTER by Table1[Code] NOT NULL AND Table1[OrderType] NOT 2

 

Cannot figure it out in DAX. I tried two seperate DAX's so I'd have:

 

LineValue = Table1[price] / Table1[exchangeRate]) * Table1[qty])

TotalValue = CALCULATE(SUM(Table1[LineValue]), FILTER(Table1, Table1[Code] <> BLANK() && Table1[OrderType] <> 2))

 
But the query I have in SQL database doesn't equal the value given in Power Bi. Can some one please help.
1 ACCEPTED SOLUTION
AAMW01
Helper I
Helper I

SOLVED - I was looking at the wrong date range, I will leave this code here if anyone needs to use it

View solution in original post

1 REPLY 1
AAMW01
Helper I
Helper I

SOLVED - I was looking at the wrong date range, I will leave this code here if anyone needs to use it

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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