March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi, I have a distinctcount calculated column on a summarized table "Summary" which is taking too long to compute (my computer runs out of memory before it can finish). Please can someone help me find a way to make this work more efficiently? Thank you.
Solved! Go to Solution.
Hi @Anonymous
You can use TREATAS as below if it's still too slow, consider moving the calculation to Power Query.
DISTINCTCOUNT_USERS_ =
VAR __filter = { ( Summary[Code], Summary[Date], "Completed" ) }
RETURN
CALCULATE(
DISTINCTCOUNT( Table1[UserID] ),
TREATAS(
__filter,
Table1[Code], Table2[EventDate], Table2[Status]
)
)
@Anonymous ,
Try if this can work better
countx(summarize(calculatetable(Table1,
filter(Table1,Table1[Code]=Summary[Code]),
filter(Table2,Table2[Status]="Completed"),
filter(Table2,Table2[EventDate]=Summary[Date])),Table1[UserID])[UserID])
Hi @Anonymous
You can use TREATAS as below if it's still too slow, consider moving the calculation to Power Query.
DISTINCTCOUNT_USERS_ =
VAR __filter = { ( Summary[Code], Summary[Date], "Completed" ) }
RETURN
CALCULATE(
DISTINCTCOUNT( Table1[UserID] ),
TREATAS(
__filter,
Table1[Code], Table2[EventDate], Table2[Status]
)
)
Hi @amitchandak are you sure the brackets etc. are in the right place? Power BI doesn't like that code
@Anonymous one , was missing
countx(summarize(calculatetable(Table1,
filter(Table1,Table1[Code]=Summary[Code]),
filter(Table2,Table2[Status]="Completed"),
filter(Table2,Table2[EventDate]=Summary[Date])),Table1[UserID]),[UserID])
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
129 | |
90 | |
75 | |
58 | |
53 |
User | Count |
---|---|
200 | |
104 | |
101 | |
67 | |
55 |