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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors