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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
_Regina
Helper I
Helper I

Dax measure taking up too much time/memory/resources

Hi All,
 
so I have these tables  
Account table
Account Number
Client id

date opened

 

Issue table
Account Number
Date received
 They are connected via account number one to many. The issue tablke has around 10K records and accounts table has around 600K records. Ofcourse the total dataset has many other tables.
I am trying to create a matrix visual where I want Client ID and number of acc they opened after first date received. One client can have mutiple accounts. I build the measure below
but it takes up too much time and eventually I have to cancel the operation. It sucks up all the memory/disk on my machine. I am really stuck and would appreciate any guidance.
 
Number of Acc Opened after tag on =
var _date_rec= CALCULATE(min('Issue'[Date Received]))
return
CALCULATE(DISTINCTCOUNT(account[Account Number]),account[Date Opened]>_date_rec)
2 ACCEPTED SOLUTIONS

I made changes to the issue table , added client id to the issue table and then joined issue table to client table in the dataset and it works fine now.

View solution in original post

I made changes to the issue table , added client id to the issue table and then joined issue table to client table in the dataset and it works fine now.

View solution in original post

4 REPLIES 4
ppm1
Solution Sage
Solution Sage

That's a pretty small dataset. I would have written that measure like this, but I would not have expected your version to have memory issues. Do you have another path between these two tables in your model (i.e., ambiguity)? Any bi-directional relationships? I'm assuming you the Accounts table is the 1 side, and that you are using the Client ID column from that table in your visual.

 

Number of Acc Opened after tag on =
VAR _date_rec =
    MIN ( 'Issue'[Date Received] )
RETURN
    CALCULATE (
        COUNTROWS ( account[Account Number] ),
        account[Date Opened] > _date_rec
    )

 

Pat

Microsoft Employee

I made changes to the issue table , added client id to the issue table and then joined issue table to client table in the dataset and it works fine now.

amitchandak
Super User
Super User

@_Regina , try with this small chnage

 

Number of Acc Opened after tag on =
var _date_rec= CALCULATE(min('Issue'[Date Received]))
return
CALCULATE(DISTINCTCOUNT(account[Account Number]),filter(account, account[Date Opened]>_date_rec) )

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

I made changes to the issue table , added client id to the issue table and then joined issue table to client table in the dataset and it works fine now.

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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