cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
wdean Regular Visitor
Regular Visitor

DAX Distinct count. Total in table to be sum of distinct counts per row, not total distinct

SnipImage.JPG

 I want to total for 'count of visitors' to be 4424 as its a unique count.

 

I tried this but it gives a huge number not even close?

 

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

 

Any help!

 

Thanks,

Warren

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: DAX Distinct count. Total in table to be sum of distinct counts per row, not total distinct

Hi @wdean,

 

You can try this measure:

Measure distinct count visitor =
SUMX (
    VALUES ( Kepler[Date] ),
    CALCULATE ( DISTINCTCOUNT ( Kepler[Visitors] ) )
)

1.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
3 REPLIES 3
Super User
Super User

Re: DAX Distinct count. Total in table to be sum of distinct counts per row, not total distinct

Need sample source data in text form that can be copied and pasted. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490


Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!


Community Support Team
Community Support Team

Re: DAX Distinct count. Total in table to be sum of distinct counts per row, not total distinct

Hi @wdean,

 

You can try this measure:

Measure distinct count visitor =
SUMX (
    VALUES ( Kepler[Date] ),
    CALCULATE ( DISTINCTCOUNT ( Kepler[Visitors] ) )
)

1.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
wdean Regular Visitor
Regular Visitor

Re: DAX Distinct count. Total in table to be sum of distinct counts per row, not total distinct

Thankyou Yuliana. That's perfect!