Find Unit Cost of Product by Location

Hi Everyone,
It’s been awhile. Hope all is safe and doing well.

I would like to find the Unit cost of the product by sales location.
The result I got was sum of unit cost instead.

Thanks in advance!

Book1.xlsx (11.4 KB)
Unit Cost by Location.pbix (27.4 KB)

Regards
Hidayat

Hi @Yatz86,

See if this meets your requirement

Unit Cost v2 = 
VAR myProduct = SELECTEDVALUE ( Material[Material] )
VAR myLocation = SELECTEDVALUE( Sales[Location] )
RETURN
    CALCULATE (
        MAX( 'Unit Cost'[Retail Price] ),
        FILTER ( 'Unit Cost', 
            'Unit Cost'[Material] = myProduct &&
            'Unit Cost'[Location] = myLocation
        )
    ) 

I hope this is helpful.

2 Likes

@Yatz86,

Good to see you back! Thanks for providing the PBIX and Data file. If you can also please just provide a mockup of the final result you want to see, i should be able to provide you a quick and specific solution back.

Thanks!

  • Brian
1 Like

Hi @BrianJ,
@Melissa suggested solution was exactly the result I wanted.
Thanks both for looking at it fast! :grinning: :beer:

Regards
Hidayat