Forum Discussion

alisag09's avatar
alisag09
Regular Visitor
3 years ago
Solved

First Record based on the Date

Hello All, I have to Tables, Products and PurchaseLines and relation is between these 2 is ItemID. To print the earliest Receipt Possible Date for a ItemID, i can use Earliest but how can i get the ...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi alisag09 ,

    Please refer to my pbix file.

    Create measures.

    date_ = CALCULATE(MIN(purchase[DeliveryDate]),FILTER(ALL(purchase),purchase[ItemId]=SELECTEDVALUE(products[ItemNumber])))
    Description = "Description of -" &"  "&MAX(products[ItemNumber])
    Earliest PurchdID = CALCULATE(MAX(purchase[PurchID]),FILTER(ALL(purchase),purchase[ItemId]=SELECTEDVALUE(products[ItemNumber])))

    If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

     

    Best Regards
    Community Support Team _ Polly

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.