Forum Discussion
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
Community Champion
Avivek -
Column = IF([owner] = [credit owner],"used","shared") Measure = IF(MAX([owner]) = MAX([credit owner]),"used","shared") - amitchandak
Super User
Avivek , As new columns
In M power Query
if [owner] = [credit] then "used" else "shared"
In dax
if ([owner] = [credit] , "used" , "shared" )- Avivek
Post 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.
- Greg_Deckler
Community Champion
Avivek - Well, going to need more information. You may have to use RELATED, RELATEDTABLE or LOOKUPVALUE but it's nearly impossible to say without good sample data and what your model looks like.
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882
Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.