Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Frequency

Hello, can anybody help me? I dont even know where to start 😞   Situation: thats not the real table because i cant share the information, but is something like this:   Costumer Product Dat...
  • v-xiaotang's avatar
    4 years ago

    Hi Anonymous 

    try this measure,

    Measure = 
        var _date=DATE(MAX('Calendar'[Date].[Year]),MAX('Calendar'[Date].[MonthNo]),1)
        var _start=EOMONTH(_date,-5)
        var _end=EOMONTH(_date,0)
    return IF(ISFILTERED('Calendar'[Date].[Month]),CALCULATE(DISTINCTCOUNT('Table'[Costumer]),FILTER(ALL('Table'),'Table'[Date]<=_end&&'Table'[Date]>_start)),BLANK())

    result

    Best Regards,

    Community Support Team _Tang

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