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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
markpatton
Helper I
Helper I

Ignoring relationships when using lookup value or alternative

I have two tables that I want to cross reference. The tables are also used for other funcions so they have active relationships based on dates, etc.

 

I want to do a lookup from one table to another to cross reference transactions. Problem is that the cross reference may involve rows that are out of the selection range. The ideal is to use lookupvalue but ignore relationships.

 

The first thing I tried was lookupvalue but found it worked only on finding the cross reference records only in the current selection based on the relationships in the model. If I removed the relationship I got all the entries. So for this option I need to be able to ignore the relationships.

 

The second thing I tried is to set up a table in a DAX column calculation that selects all records. I found that this does find all the entries but now I need to select a text value of the rows in the table. How do I do this.

 

The following works to return the line amount for the filtered table, What I need to do is return a text value for a column of the row. 

 

VAR _matching_bills = filter(Bills, Bills[GLTxn Line Item Description] = Invoices[GLTxn Line Item Description])
VAR _match_count = format(countrows(_matching_bills), "General Number")
return if (_match_count = "1", format(sumx(_matching_bills, [GLTxn Line Amount]), "General Number"), "Not Found")
 
I tried the MAX function but can't figure out how to use it on a table variable.
 

 

1 REPLY 1
bcdobbs
Super User
Super User

Hi,
Without seeing your data model it's hard to work out exactly what you're trying to do however you might find...

CROSSFILTER - DAX Guide with the 3rd parameter set to "None" within a CALCULATE statement.

However I think more likely you want to remove any filters coming from the date table?

 

Eg
CALCULATE (
[Your Measure],
REMOVEFILTERS(Date)
)



Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.