Forum Discussion

Akos07's avatar
Akos07
Helper I
4 years ago
Solved

Price calculations help

Hello,   I run into a problem, and i cant find a good solution. I could use some advice 🙂   My problem: I have a price table that contains gross prices, productid, start date, end date(nullable...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi Akos07 ,

     

    Please try:

    Measure = 
    var _id= CALCULATE(MAX('Table'[ID]),FILTER('Table',[start]<=MAX('Dates'[Date]) && ( [end]=BLANK() || [end]>=MAX('Dates'[Date])))) 
    return MAXX(FILTER('Table',[ID]=_id),[Gross])

     

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