Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
tracyhopaulson
Resolver I
Resolver I

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

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


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

4 REPLIES 4
v-chuncz-msft
Community Support
Community Support

@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.

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. 

 

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


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



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

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.