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
Anonymous
Not applicable

Optimising dax with filter

Hello to all,
I have a performance problem with the following formula.

 

Clients with call after =
COUNTROWS (
DISTINCT (
SELECTCOLUMNS (
FILTER (
ADDCOLUMNS (
GENERATE (
SUMMARIZE ( 'GA web', 'GA web'[id_client], 'GA web'[timestamp] ),
SUMMARIZE (
FILTER ('Call data',
'Call data'[id_client] = 'GA web'[id_client]
&& 'GA web'[id_client] > 0 ),
'Call data'[TIMESTAMP] )
),
"Dif.", DATEDIFF ( 'GA web'[timestamp], 'Call data'[TIMESTAMP], MINUTE )
),
AND ( [Dif.] >= 0, [Dif.] <= 60 )
),
"id_client", 'GA web'[id_client]
)))


I have two tables:

GA-web: log customer activity on the web, with a unique customer identifier.
Calls: I register the phone activity of the call centre and the calls they have for each unique customer identifier.

FedeFe_0-1613665089576.png

id_client is a number between 4 and 11 numbers.
timestamp is the date, hour, minute and second value of when the event occurs.

 

 

What I am looking for is to search for each Google Analytics event, if the id_person has a subsequent call in less than an hour.
The module works fine, but when I ask it to calculate longer periods it tells me that I don't have enough memory.
I have tried replacing FILTERs with TREATAS, KEEPFILTERs, USERELANTIONSHIP or CROSSFILTER, however, the calculation time increases to half an hour or more.
Can you think of a way to optimise it?
Thank you very much.

2 REPLIES 2
parry2k
Super User
Super User

@Anonymous there is a lot more going on in your DAX, just DAX doesn't give the full picture, I would recommend sharing a relationship diagram for the tables involved, provide sample data and expected output, it will help tremendously to understand the problem and provide an effective solution.

 

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

Hello @parry2k !
I just edited the initial post to include more information.
Thank you very much!

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.