cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
florent-3628 Frequent Visitor
Frequent Visitor

How to join large tables whithout exceeding max resources ?

Hi , i try to fill a column from three table. 100k rows per table

 

I use this measure , and it work , but i'm exceeding max resources ...

if(SELECTEDVALUE(main[state])="new";SELECTEDVALUE(newtable[version]);SELECTEDVALUE(oldtable[version]))

I'm not familiar with DAX but i wonder the problem is with "selectedvalue" but i don't know what else to use...

 

Anyone can help ?

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: How to join large tables whithout exceeding max resources ?

Hi @florent-3628,

 

My bad. It's a measure. You may still use a measure. It could be like this.

 

Measure =
IF (
    MIN ( main[state] ) = "new";
    MIN ( newtable[version] );
    MIN ( oldtable[version] )
)

The formula of a Calculated Column could be like below.

 

 

Measure =
IF (
    main[state] = "new";
    RELATED ( newtable[version] );
    RELATED ( oldtable[version] )
)

 

Best Regards,

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
5 REPLIES 5
Super User
Super User

Re: How to join large tables whithout exceeding max resources ?

Not sure regarding performance but you can often use an aggregation like MIN or MAX in lieu of SELECTEDVALUE. You could give that a try to see if performance improves.


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

Proud to be a Datanaut!


Community Support Team
Community Support Team

Re: How to join large tables whithout exceeding max resources ?

Hi @florent-3628,

 

What are the relationships among these tables? It seems a calculated column. If so, the SELECTEDVALUE could be in the wrong place. Try this formula, please.

 

Column =
IF ( main[state] = "new"; MIN ( newtable[version] ); MIN ( oldtable[version] ) )

 

Best Regards,
Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
florent-3628 Frequent Visitor
Frequent Visitor

Re: How to join large tables whithout exceeding max resources ?

Hi,

MIN or MAX doesn't give the correct result ; Have a look:

2019-01-15 15_44_21-tests - Power BI Desktop.png2019-01-15 15_48_01-tests - Power BI Desktop.png

Community Support Team
Community Support Team

Re: How to join large tables whithout exceeding max resources ?

Hi @florent-3628,

 

My bad. It's a measure. You may still use a measure. It could be like this.

 

Measure =
IF (
    MIN ( main[state] ) = "new";
    MIN ( newtable[version] );
    MIN ( oldtable[version] )
)

The formula of a Calculated Column could be like below.

 

 

Measure =
IF (
    main[state] = "new";
    RELATED ( newtable[version] );
    RELATED ( oldtable[version] )
)

 

Best Regards,

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
florent-3628 Frequent Visitor
Frequent Visitor

Re: How to join large tables whithout exceeding max resources ?

Hi, Column + related was the right way ! Thank you so much .

 

Now i can use a lot of tables and display 5 column like this without any problem:

2019-01-22 11_41_25-powerbi.png