Forum Discussion

Nini1's avatar
Nini1
Frequent Visitor
4 years ago
Solved

How Slicer Filter can affect column calculations?

Hello everyone,   I'm a new user of Power BI and need your help to solve the problem. I have a data of customer who have unique identifier and corresponding date field.   I want to create ...
  • amitchandak's avatar
    4 years ago

    Nini1 , Ideally these should work from Max and min

    maxx(allselected(tbl) , tbl[date])

     

    minx(allselected(tbl) , tbl[date])

     

    But if slicer is on another table try like

    maxDateAll=
    Var _max = maxx(allselected(Date) , Date[date])
    Var _min = minx(allselected(Date) , Date[date])
    return
    CALCULATE ( MAX ( tbl[date] ), filter(ALLSELECTED(tbl), tbl[date] <= _max && tbl[date] >= _min))