Forum Discussion

denxx34's avatar
denxx34
Frequent Visitor
3 years ago
Solved

DAX: Dynamic Filter on Min and Max selected Date

I greet you,   just stuck on the following problem: 3 tables: Item, Stock, Calendar   The stock of the article is saved per day.   What I need... 1. I choose a period (From- To in a slicer fr...
  • amitchandak's avatar
    3 years ago

    denxx34 , Try a measure like

     

    //Date table and Date is Joined
    Delta =
    var _max = maxx(allselected(Date),Date1[Date])
    var _min = minx(allselected(Date),Date1[Date])
    return
    calculate( Max(Table[Quantity]), filter('Date', 'Date'[Date] =_max )) - calculate( Max(Table[Quantity]), filter('Date', 'Date'[Date] =_min))

     

    You can sperate min and max two have two more measures