Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Date Parameters for Filtering and DAX formula

Hi, I am trying to create a report that shows how many users carried out more than X number of "actions" per month over a particular time period. For example, X% of users used the app 5x per month during the reporting period, Y% of users used the app 10x per month during the reporting period. For this I need:

 

- Report date start and end parameter

- Reporting period duration in month DAX formula (end - start) in months. This seems easy.

- Compute aggregate per month activity per user. Also seems easy.

 

The problem is that there is no date parameter support from what I can see. Any advice on how to go about this?

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Anonymous ,

     

    I made simple samples and you can check the results below:

    Count = var _date1 = MIN('Table 2'[Date])
    var _date2 = MAX('Table 2'[Date])
    RETURN COUNTAX(FILTER('Table',[Date]>=_date1&&[Date]<=_date2),[ID])
    
    Table 2 = CALENDAR(MIN('Table'[Date]),MAX('Table'[Date]))

    Also this format is for visual:

     

    An attachment for your reference. Hope it helps!

     

    Best regards,
    Community Support Team_ Scott Chang

     

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

     

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

     I should also note that I don't think that tooltip is correct. 

     

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

     

    I made simple samples and you can check the results below:

    Count = var _date1 = MIN('Table 2'[Date])
    var _date2 = MAX('Table 2'[Date])
    RETURN COUNTAX(FILTER('Table',[Date]>=_date1&&[Date]<=_date2),[ID])
    
    Table 2 = CALENDAR(MIN('Table'[Date]),MAX('Table'[Date]))

    Also this format is for visual:

     

    An attachment for your reference. Hope it helps!

     

    Best regards,
    Community Support Team_ Scott Chang

     

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