Reply
Highlighted
Frequent Visitor
Posts: 4
Registered: ‎01-10-2019
Accepted Solution

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 ?


Accepted Solutions
Community Support Team
Posts: 7,676
Registered: ‎05-02-2017

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.

View solution in original post


All Replies
Super User
Posts: 10,570
Registered: ‎07-11-2015

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
Posts: 7,676
Registered: ‎05-02-2017

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.
Frequent Visitor
Posts: 4
Registered: ‎01-10-2019

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
Posts: 7,676
Registered: ‎05-02-2017

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.
Frequent Visitor
Posts: 4
Registered: ‎01-10-2019

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