Forum Discussion

Nigel99's avatar
Nigel99
Frequent Visitor
3 years ago
Solved

MTD Not Working Properly

Table: Date Item 1-Aug Apple 1-Aug Orange 1-Aug Banana 2-Aug Apple 2-Aug Orange 3-Aug Apple   There are 2 slicers: Slicer1: Date: Single Selection Slicer2: Item: M...
  • v-zhangti's avatar
    3 years ago

    Hi, Nigel99 

     

    You can try the following methods.
    New table:

    Date = CALENDAR(MIN('Table'[Date]),MAX('Table'[Date]))

    Measure = Var _table=CALCULATETABLE(VALUES('Table'[Item]),FILTER('Table',[Item]<>BLANK()))
    Return
    CALCULATE(COUNT('Table'[Item]),FILTER(ALL('Table'),[Date]<=MAX('Date'[Date])&&[Item] in _table))

    Is this the result you expect?

     

    Best Regards,

    Community Support Team _Charlotte

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