Forum Discussion

AlanP514's avatar
AlanP514
Post Patron
2 years ago

Conditional Dynamic Dax Segregation on customer

Hi All ,
I am expecting Help on this to achive this logic
I need to segregate user into three categories
Active Customer, Super Active Customer,Hyper Active Customer

Based on the year and month selection applying  in the power bi report 
customer segregation should happen

I have two slicers one is Year, and Month  Based on the these selection my power bi pivot table will work dynamically from selected month to last 6 months for eg (I am selecting September 2023 from slicer my power bi pivot table will work from septmber to April)
Diagram :1 

I need to segregate customer based on the above pivot table into Active Customer, Super Active Customer,Hyper Active Customer
For these need consider these conditions

1 . Active Customer =  if the Count of Login time is greater than equal to 1 for the entire selected 6 months and if minimum value is (1 ,2)then that user is active customer
2. Super Active Customer =  if the Count of Login time is greater than equal to 3 for the entire selected 6 months and if minimum value is 3 or 4 then that user is Super active Customer
3.Hyper Active Customer =  if the Count of Login time is greater than equal to 5 for the entire selected 6 months and if minimum value is 5 then that user is Hyper active Customer


I am attaching the data model also here


This is the data model dynamic month name is coming from Previous date calendar table and month slicer is coming from Calendar table and user id and login is coming from fact tracking table
Appreciate Help on this to achive the logic 

10 Replies

  • Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot). Leave out anything not related to the issue.
    If you are unsure how to do that please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
    Please show the expected outcome based on the sample data you provided.

    If you want to get answers faster please refer to https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

  • Hi,

    Why has UserID 300004579 been classified as "Super Active Customer"?  The minimum login value of this customer is 1,2.  Share raw data in a format that can be pasted in an MS Excel file.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hai Ashish_Mathur 

      Customer 300004579 login count is greater than 3 and if the minimum value is 3 or 4 for selected 6 months

      Then that customer should be super active customer

      So based on this condition I can say mentioned customer is super active , we can categorise while seeing login count of this user's data

       

      I will provide you the sample data of this

      But big thanks Ashish_Mathur  your response

      I will provide you the data

      • Ashish_Mathur's avatar
        Ashish_Mathur
        Super User

        You are welcome.  I am confused.  For that customer, the minimum count is 1 and therefore he should be Active not Super Active.

    • AlanP514's avatar
      AlanP514
      Post Patron

      Hai Ashish_Mathur 
      As you said i am pasting mock data
      Please find attached excel sheet , and please let me know the solution for achiving this customer segmentation based on the selection

      • Ashish_Mathur's avatar
        Ashish_Mathur
        Super User

        Since you have still not clarifies my previous doubt (asked yesterday), even if i download the file, i will not be able to help you.

    • AlanP514's avatar
      AlanP514
      Post Patron

      Hi   Ashish_Mathur 
      ,yes as u said the customer  300004579 should be active customer only, i mistakenly mapped to super active customer, 
      i am attaching segregation conditon, kindly have a look and let me know if you have any queries , and please provide solution 


      1 . Active Customer =  if the Count of Login time is greater than equal to 1 for the entire selected 6 months and if minimum value is (1 ,2)then that user is active customer
      2. Super Active Customer =  if the Count of Login time is greater than equal to 3 for the entire selected 6 months and if minimum value is 3 or 4 then that user is Super active Customer
      3.Hyper Active Customer =  if the Count of Login time is greater than equal to 5 for the entire selected 6 months and if minimum value is 5 then that user is Hyper active Customer

      Regards,
      Alan P James
      https://www.linkedin.com/in/alan-p-james-76b6aa16a/




      Ashish_Mathur