Yatz86
March 12, 2021, 3:48pm
1
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
BrianJ
March 12, 2021, 4:41pm
3
@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!
1 Like
Yatz86
March 13, 2021, 1:16am
4
Hi @BrianJ ,
@Melissa suggested solution was exactly the result I wanted.
Thanks both for looking at it fast!
Regards
Hidayat