Forum Discussion

Thackeb's avatar
Thackeb
Advocate I
5 years ago
Solved

IF statement returns 2 options per line.

 

I want a field that designates if a customer is growing or declining. I've tried a Dax, custom column, etc.  It continues to give two responses.  In the orignal data the sales field has custom columns that designate if it's current or past sales. 

 

Latest try was: 

Cust Status = 

IF('Export Worksheet'[PY Net Sales $] > 'Export Worksheet'[CY Net Sale $], "Declining","Growing")

  • Hi, Thackeb 

    Please correct me if I wrongly understood your question.

    If you want to show "Grow" or "Decline" as a column in the visualization, in my opinion, the additional table is needed something like the below.

    Please check the picture and the sample pbix file's link down below whether it is what you are looking for.

    All measures are in the sample pbix file, and all steps are numbered in front of each measure.

     

     

    https://www.dropbox.com/s/m3szqz8cq2hhje2/thackeb.pbix?dl=0 

     

    Hi, My name is Jihwan Kim.

     

    If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

     

    Linkedin: linkedin.com/in/jihwankim1975/

    Twitter: twitter.com/Jihwan_JHKIM

2 Replies

  • Hi, Thackeb 

    Please correct me if I wrongly understood your question.

    If you want to show "Grow" or "Decline" as a column in the visualization, in my opinion, the additional table is needed something like the below.

    Please check the picture and the sample pbix file's link down below whether it is what you are looking for.

    All measures are in the sample pbix file, and all steps are numbered in front of each measure.

     

     

    https://www.dropbox.com/s/m3szqz8cq2hhje2/thackeb.pbix?dl=0 

     

    Hi, My name is Jihwan Kim.

     

    If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

     

    Linkedin: linkedin.com/in/jihwankim1975/

    Twitter: twitter.com/Jihwan_JHKIM

    • Thackeb's avatar
      Thackeb
      Advocate I

      Unfortunately I don't have access to tables or columns as our dataset is read-only. I will keep the suggestions for other projects...thank you!