Forum Discussion

Avivek's avatar
Avivek
Icon for Post Partisan rankPost Partisan
6 years ago

Column A= Column B then show a given value

I have a table in which I have two columns, one for the order owner and another for credit owner.

 

My requirement is if order owner = credit owner show used else show shared. Is it possible with a dax or is there any other way of doing so.

5 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Icon for Community Champion rankCommunity Champion

    Avivek -

    Column = IF([owner] = [credit owner],"used","shared")
    
    Measure = IF(MAX([owner]) = MAX([credit owner]),"used","shared") 
  • Avivek , As new columns

    In M power Query

    if [owner] = [credit] then "used" else "shared"

     

    In dax
    if ([owner] = [credit] , "used" , "shared" )

    • Avivek's avatar
      Avivek
      Icon for Post Partisan rankPost Partisan

      Thankyou amitchandak  and Greg_Deckler ,

       

      I had used a similar measure but it is not giving the correct result. And also when i apply this measure I am getting additional blank columns.

      (PS-Please ignore my mess on the image)

      And I cannot create the calculated colum since order owner and credit goes to are from 2 different tables.

      Also when I added the measure into my existing table visual which had around 11 other columns, the table was processing it for a long time.

       

      Is there any other way by which I can get the result without affecting the performance of the report.