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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
v-shex-msft
Community Support
Community Support

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
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 and Go to My LinkedIn Page


Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.