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

DISTINCTCOUNT with FILTER Running Slowly

Hello - I have the following measure that is running slowly in my dataset.  Is there a better way to apply the filter to get the correct count?  I am getting a CallbackID error in dax studio on this measure as well.  Any tips or ideas would be greatly appreciated!

 

CALCULATE (
DISTINCTCOUNT ( tblDim_AccountPlan[ClientParentName] ),
FILTER ( tblDim_AccountPlan, [CY TTM Gross Revenue] <> 0)
)
2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous,

Did the above suggestion help with your scenario? if that is the case, you can consider Kudo or Accept it to help others who faced similar requirements.

If these also don't help, please share more detailed information to help us clarify your scenario to test.

How to Get Your Question Answered Quickly 

Regards,

Xiaoxin Sheng

Jihwan_Kim
Super User
Super User

Hi,

I am not sure how your data model looks like, but please try the below.

 

new measure: =
CALCULATE (
    DISTINCTCOUNT ( tblDim_AccountPlan[ClientParentName] ),
    FILTER (
        VALUES ( tblDim_AccountPlan[ClientParentName] ),
        [CY TTM Gross Revenue] <> 0
    )
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

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.