Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi,
I hope you can help me with this issue. The problems may look pretty simple but I just cannot make it work.
I wrote this DAX code:
=
VAR _Company = IF(HASONEVALUE(Inventory[Company]), VALUES(Inventory[Company]))
VAR _ValueInAUD = SUMX(VALUES('Item'[Item No.]),[Inventory To Date ($)] * [AU FX Rate])
VAR _Result = IF(_Company = "AU" , [Inventory To Date ($)],_ValueInAUD)
RETURN
_Result
The problem is that on an item level, I am getting the correct result. But the total on Inventory To Date ($ AUD) is not correct. $292,404 + $32,215 = $324,719, not $303,812.
I think $303,812 is result of $292,404 multiplied by the AU FX rate (0.9285) plus $32,315. But I don't like to convert $292,404 since this is already in AUD (the company is AU).
I've tried a modifications in my code but i just cannot get to my desired output.
Appreciate your help in advance.
Thanks
Jojemar
Solved! Go to Solution.
Try
My Measure =
SUMX (
VALUES ( Inventory[Company] ),
VAR _ValueInAUD =
SUMX ( VALUES ( 'Item'[Item No.] ), [Inventory To Date ($)] * [AU FX Rate] )
VAR _Result =
IF ( Inventory[Company] = "AU", [Inventory To Date ($)], _ValueInAUD )
RETURN
_Result
)
Try
My Measure =
SUMX (
VALUES ( Inventory[Company] ),
VAR _ValueInAUD =
SUMX ( VALUES ( 'Item'[Item No.] ), [Inventory To Date ($)] * [AU FX Rate] )
VAR _Result =
IF ( Inventory[Company] = "AU", [Inventory To Date ($)], _ValueInAUD )
RETURN
_Result
)
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
9 | |
7 | |
6 | |
5 |
User | Count |
---|---|
20 | |
14 | |
10 | |
9 | |
6 |