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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Chandrakala1510
Regular Visitor

Do sum of distinct count

I need to do sum of ditinctcount function

 DISTINCTCOUNT(table[cate])

and this measure i will use for multiple category of visuals

i found this solution 

User Distinct =
VAR t =
    SUMMARIZE (
        'Table',
        Table[Date],
        "UserDistinct", DISTINCTCOUNT ( Table[Name] )
    )
RETURN
    SUMX ( t, [UserDistinct] )

, but this is not working for me

its very urgent for me can anyone help on this? 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Chandrakala1510 ,

 

I agree with parry2k, I suggest you to summairze your calculation based on [Status] column. Due to [Status] column is the key column of this visual, so if you want to get correct total, you need to sumx the discount based on [Status] column.

Workaound1: 

UserDistinct = DISTINCTCOUNT ( Table[Name] )
UserDistinct with correct subtotal =
SUMX ( VALUES ( 'Table'[Status] ), [UserDistinct] )

Workaound2: 

User Distinct =
VAR t =
    SUMMARIZE (
        'Table',
        Table[Status],
        "UserDistinct", DISTINCTCOUNT ( Table[Name] )
    )
RETURN
    SUMX ( t, [UserDistinct] )

If this reply still couldn't help solve your issue, please share a sample file with me.

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

7 REPLIES 7
parry2k
Super User
Super User

@Chandrakala1510 you don't have to type in CAPITAL letters. Take it easy. First, why you are summarizing in the first place? Provide full details if you need help. Just sharing DAX doesn't help. Read this post to get your answer quickly.

https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490



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.

can reply any one on this issue. this is urgent

Anonymous
Not applicable

Hi @Chandrakala1510 ,

 

I agree with parry2k, I suggest you to summairze your calculation based on [Status] column. Due to [Status] column is the key column of this visual, so if you want to get correct total, you need to sumx the discount based on [Status] column.

Workaound1: 

UserDistinct = DISTINCTCOUNT ( Table[Name] )
UserDistinct with correct subtotal =
SUMX ( VALUES ( 'Table'[Status] ), [UserDistinct] )

Workaound2: 

User Distinct =
VAR t =
    SUMMARIZE (
        'Table',
        Table[Status],
        "UserDistinct", DISTINCTCOUNT ( Table[Name] )
    )
RETURN
    SUMX ( t, [UserDistinct] )

If this reply still couldn't help solve your issue, please share a sample file with me.

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

parry2k
Super User
Super User

@Chandrakala1510 you are grouping by date in the summarize and viewing it by Status, what if you change the grouping to Status and then check it?



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.

NO I DONT want to grouping it by any category in measure.

because i want to view it by multiple category

not just STATUS

so need one solution

parry2k
Super User
Super User

@Chandrakala1510 can you share what is not working? How does data look like? What do you want the output to be?



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.

Chandrakala1510_2-1693594544786.png

 

here total should be 424 but it is comming 423

because i have used distinct count function DAX

and this 

distinctCount(table[column]) 

i am using in many visuals

so not possible to create 

User Distinct =
VAR t =
    SUMMARIZE (
        'Table',
        Table[Date],
        "UserDistinct", DISTINCTCOUNT ( Table[Name] )
    )
RETURN
    SUMX ( t, [UserDistinct] )

multiple measures for various category

need help

 

give me solution to create only one DAX for all kind of category solution

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

Top Solution Authors
Top Kudoed Authors