Forum Discussion
curtismob
4 years agoHelper IV
Using the First Value Of a Group
Hello, Below is what I am trying to accomplish. Use the cost for the first vendor in the grouping, where the "As Of" date selected falls w/in the Effective/Expiration range. Grouping is by Catego...
V-lianl-msft
4 years agoCommunity Support
Hi curtismob ,
Try to create a measure like below and apply it to visual level filter:
Measure 2 =
var rank_ =
RANKX (
ALLEXCEPT( Cost,Cost[CostCode] ),
[Measure Cost AsOf]
)
var min_vendor = CALCULATE(MIN(Cost[VendorNo]),FILTER(ALLSELECTED(Cost),Cost[CostCode]=MAX(Cost[CostCode])))
return IF(rank_=1&&MAX(Cost[VendorNo])=min_vendor,1,0)
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
curtismob
4 years agoHelper IV
Hi V-lianl-msft,
Thank you for the response, I'm not sure why I wasn't notified you reponded. I will give this a try and update this thread.