cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
tracyhopaulson Regular Visitor
Regular Visitor

Need HELP with DAX comparison

I have 2 tables (PO & Item) that have the 2 elements I am doing a comparison.  If the Line Revision and the PO Revision for each PO is the different, then I want to mark it "True" for further analysis.  I've tried Rev Comparision= IF(PO[PORevision]=Item[ItemRevision], "True", "False") but it's giving me error! for example, Line 7 where the revision is not the same, I would want to mark it false.   Can someone help please?Capture.JPG

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Need HELP with DAX comparison

Hi @tracyhopaulson ,

 

Based on the file you sent me trough private message do the following:

  • Create the following measure:
RevComparision = MAX(Items[Revision]) = MAX(PurchaseOrderLines[Revision])
  • Add the PurchaseOrderLines[Line] to your filter pane and select is not blank, final result is below:

Comparision.png

Regards,

MFelix



Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!




4 REPLIES 4
Community Support Team
Community Support Team

Re: Need HELP with DAX comparison

@tracyhopaulson ,

 

You may try the DAX below to add a calculated column.

Column =
IF ( RELATED ( PO[PORevision] ) = 'Item'[ItemRevision], "True", "False" )
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
tracyhopaulson Regular Visitor
Regular Visitor

Re: Need HELP with DAX comparison

I entered your formula and got error that the ItemRevision column either doesn't exist or doesn't have a relationship to any table available in the current context. 

 

Super User
Super User

Re: Need HELP with DAX comparison

Hi @tracyhopaulson ,

 

Based on the file you sent me trough private message do the following:

  • Create the following measure:
RevComparision = MAX(Items[Revision]) = MAX(PurchaseOrderLines[Revision])
  • Add the PurchaseOrderLines[Line] to your filter pane and select is not blank, final result is below:

Comparision.png

Regards,

MFelix



Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!




tracyhopaulson Regular Visitor
Regular Visitor

Re: Need HELP with DAX comparison

@MFelix  yes, this works.  You're a super STAR.  Thanks for your help :-)

Helpful resources

Announcements
GregDeckler

How to Get Your Question Answered Quickly

Power BI Super User, Greg Deckler, explains

Summit North America

Power Platform Summit North America

Register by September 5 to save $200

Back to School Contest

Back to School Contest

Engage and empower students with Power BI!

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Top Ideas
Users Online
Currently online: 246 members 2,592 guests
Please welcome our newest community members: