Forum Discussion

vishy0501's avatar
vishy0501
Helper I
6 years ago

Condition Breach Rule - DAX conditional Lookup

Hi ALL,

 

I am stuck  with a scenario wherein I need to identify whether the user has breach a particular condition in previous month.

In the dataset i have three rows for each user for three month. Each month the fact value is different and i have created a calculated column which tells whether the user adheres or not . Based on that calculated column i need to find how many times the user has breached the policy. So if the user has "HIGH risk" as the value in that column in past two months I need to highlight that particular user..

 

Note I have two different date columns and it needs to be calculated using these two different date.

 

Attached is the sample dataset as well

 

Name PlanMI_SUBSCRIPTION_IDCHARGED_MBUNIQUE_CALLSTOT_INCOMING_CALLSTOT_OUTGOING_CALLSOG_CHARGED_MINSIC_CHARGED_MINSMI_FROM_DATEMI_TO_DATEAbuser Descr
Rose123456701-Oct31-OctFair Use
Rose134567831-Oct30-SepHigh Risk
Lotus3447981201-Oct30-NovHigh Risk
Rose1123455601-Aug30-AugHigh Risk

2 Replies

  • kentyler's avatar
    kentyler
    Solution Sage

    your second row covers 2 months, 31 oct -> 30 sept, is both oct and sept. what is your logic for determining the "month" of each row ?

    • vishy0501's avatar
      vishy0501
      Helper I

      Hi kentyler  - 

       

      I am using Single active relationship between my date dim and from date. And calculating the values accordingly.