Forum Discussion

lavadba's avatar
lavadba
Icon for Microsoft Employee rankMicrosoft Employee
3 years ago

Need help on the DAX formulation

I would like to prepare a PBI report with below parameter.

 

  • Net New – Any user who used the Application in the last month and hasn't ever used before.

  • Any user who used Application in the last month (e.g., Sep 2022), but didn’t use it for over 6 months before Last month (e.g., didn’t use in the timeframe of Aug –Mar 2022).

Any body can help on how to prepare the DAX formula for above condition.

5 Replies

  • Hi,

    I usually try to solve this types of problem by using INTERSECT and EXCEPT DAX functions.

    If possible, please share your sample pbix file's link here, and then I can try to look into it to come up with a proposal.

    Thanks.

  • Hi lavadba

     

    Based on your description, I have created a simple sample:

    Please try:

    First create three measures:

     

    Count Last Month = COUNTX(FILTER('Table',MONTH([Date])=MONTH(TODAY())-1),[User])
    
    Count Before = COUNTX(FILTER('Table',MONTH([Date])<MONTH(TODAY())-1),[User])
    
    Count 6 Month Before Last Month = COUNTX(FILTER('Table',MONTH([Date])<MONTH(TODAY())-1&&MONTH([Date])>MONTH(TODAY())-8),[User])
    
    

     

     

    Then create a new table with [User] Column and rename it:

     

    Apply the measures to the visual level filter:

    Recreate a new table for users who didn’t use it for over 6 months before Last month and apply filter:

     

    Final output:

    Best Regards,

    Jianbo Li

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

  • lavadba's avatar
    lavadba
    Icon for Microsoft Employee rankMicrosoft Employee

    I am unable to upload the pbix file here.  attaching the screen shot of the data. please let me know is there any other way.

     

     

  • Hi lavadba ,

     

    I can't get enough details from your screen shot. Could you please provide more details about your data? Such as another month and your source table.

    Please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.

     

    Refer to:

    How to provide sample data in the Power BI Forum

    How to Get Your Question Answered Quickly

     

    Best Regards,

    Jianbo Li

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

    • lavadba's avatar
      lavadba
      Icon for Microsoft Employee rankMicrosoft Employee

      Hi v-jianboli,

      Please find the link below which contains the sample data.

       

      https://1drv.ms/u/s!AviWXdHQvbntpEuJaStqa9SuESUf?e=iaIqRp

       

      Below conditions are is the requirement to create a trend chart for users.

      Trend chart showing monthly usage trends for the following personas of users:

      o Net New – Any user who used at all before application in the focus month and hasn't ever used application.

      o Long-Regained - Any user who used application in the focus month (e.g., Sep 2022), but didn’t use it for over 6 months before focus month (e.g., didn’t use in the timeframe of Jul –Feb 2022) AND used it at least once before 6 months (i.e. before Feb 2022).

      o Short-Regained - Any user who used application in the focus month (e.g., Sep 2022), but didn’t use it in 1 months before focus month (e.g., didn’t use in the timeframe of July 2022) AND used it between the last 2 to 6 months period (e.g., used it at least once in the period of June 2022 - Feb 2022).