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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
selpaqm
Helper V
Helper V

Containstring takes ages

Hi,

 

i have a calculated column contains containstring. it works however each refresh take hours with more than 1000 rows. normally my table has more than 400k rows. so is there any way to speed it up with changing another think.

 

if (Countx (filter (Table2, CONTAINSSTRING (Table2 [ID], Table1 [ID])), Table2 [ID])> 0, "Yes", "No")

also you may find entire example on below link 

 

example 

1 ACCEPTED SOLUTION

Hi @selpaqm ,

 

I once created a Power Query prototype here. The merging between the two tables can possibly still be optimized.

See attachement.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


View solution in original post

6 REPLIES 6
Greg_Deckler
Super User
Super User

@selpaqm - Perhaps try SEARCH or FIND instead of CONTAINSSTRING?


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler  thanks for your suggestion. when i try to use search, I have get "The search Text provided to function 'SEARCH' could not be found in the given text." error.

"minx(filter(table,search(" does not fit.

Hi @selpaqm ,

 

I once created a Power Query prototype here. The merging between the two tables can possibly still be optimized.

See attachement.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


@mwegener thanks for your work. I think I have trouble on added custom1 (true false contain section) it gives below error.

 

Expression.Error: We cannot apply operator & to types Number and Text. Details: Operator=& Left=2030691335 Right=

Hi @selpaqm ,

 

you are trying to combine a text with a number. Both values must first be converted to the data type text.

 

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


Hi @mwegener ,

 

thanks for the solution, I realized and fixed it. waiting to calculation ending, seems all contain column as "FALSE". after calculation hope it will be ok.

 

 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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