Forum Discussion
Finding the match
Hi All,
I have two tables DimCommissionAgreements with Description3 column and DimCommissionAgreementsCriteria with Status COlumn. The two tables are connected with one to many relationship. Now, I want to compare the two columns and add a new column in DimCommissionAgreements table where if Description3 = Status then 0 else 1. But right now i have an issue as below.
even if the Description3 and Status is different it gives me 0.i have put the formula used below.
- Anonymous2 years ago
Hi,
thanks for the soluition Greg_Deckler offered, and i want to offer some more information for user to refer to.
hello jostnachs , you can consider to create a measure instead of calculated column.
MEASURE = IF ( MAX ( Sheet1[Description3] ) <> BLANK (), IF ( MAX ( Sheet1[Description3] ) = MAX ( 'Sheet1 (2)'[Status] ), 0, 1 ) )Output
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
3 Replies
- Greg_DecklerCommunity Champion
jostnachs Sorry, having trouble following, can you post sample data as text and expected output?
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.- jostnachsHelper IV
Hi, Yes I have recreated with sample data which I am attaching . The requirement is the description3 and status has to be compared and if they are same give me 0 else give me 1. in my case, i am having 0 even when they are not same. I have put up formulas in the attached PBIX file. highlighted in the below screenshot is the error.
https://drive.google.com/file/d/1udIEpRbjyrB7_sY_ov8BluQJ2IAaYHbB/view?usp=sharing
Thanks,
Jostna
- AnonymousNot applicable
Hi,
thanks for the soluition Greg_Deckler offered, and i want to offer some more information for user to refer to.
hello jostnachs , you can consider to create a measure instead of calculated column.
MEASURE = IF ( MAX ( Sheet1[Description3] ) <> BLANK (), IF ( MAX ( Sheet1[Description3] ) = MAX ( 'Sheet1 (2)'[Status] ), 0, 1 ) )Output
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.