Forum Discussion

Chandrashekar's avatar
Chandrashekar
Icon for Resolver III rankResolver III
2 years ago
Solved

Help with Dax

Hello,

 

Can you please help me with Dax as not getting value for previous month.

 

I need this for some purpose as am aware to get this creating relationship.

 

 

Sample File: PBIX 

 

Regards,

Chandrashekar B

  • Jihwan_Kim's avatar
    Jihwan_Kim
    2 years ago

    Sorry and I do not understand what do you mean by, [I do not want give relationship].

    Your file already had a relationship,

    my first suggestion was changing the relationship.

     

    But, I assume deleting the relationship. Am I correct?
    Please correct me if I am wrong.

     

     

     

5 Replies

    • Chandrashekar's avatar
      Chandrashekar
      Icon for Resolver III rankResolver III

      Hello,

       

      I do not want give relationship. is it possible without relation by using DAX.

      DAX as follows
      1. Selected_month = SELECTEDVALUE('Calendar'[MonthYear]) ' stores selected month
      2. Selected_Month_Prev1 = date(year([Selected_Month]),Month([Selected_Month])-1,1) 'stores selected motnh -1 .for ex: if selected month is Apr-24 it stores Mar-24
      I need dax for both selected month &  Selected_Month_Prev1

       

      Sample File: PBIX 

       

      Regards,

      Chandrashekar B

      • Jihwan_Kim's avatar
        Jihwan_Kim
        Icon for Super User rankSuper User

        Sorry and I do not understand what do you mean by, [I do not want give relationship].

        Your file already had a relationship,

        my first suggestion was changing the relationship.

         

        But, I assume deleting the relationship. Am I correct?
        Please correct me if I am wrong.