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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Distintcount and sum

How can I use distinctcount but also be able to do summarization?  I am this DAX

FollowedUP = CALCULATE(DISTINCTCOUNT(CSRQTFollowup3[FollowUp]),FILTER(CSRQTFollowup3,CSRQTFollowup3[FollowUp] = 1 ))
 
 

FollowedUp

Capture.JPG

 
7 REPLIES 7
amitchandak
Super User
Super User

@Anonymous 

I am not sure of Group by/ Row , you have used , but something like this will work

FollowedUP =
sumx(Summarize(CSRQTFollowup3, CSRQTFollowup3[Queue],"_dist"
CALCULATE(DISTINCTCOUNT(CSRQTFollowup3[FollowUp]),FILTER(CSRQTFollowup3,CSRQTFollowup3[FollowUp] = 1 ))),[_dist])

 

Change this with appropriate column CSRQTFollowup3[Queue]

Anonymous
Not applicable

Capture1.JPG

 

 

@amitchandak   Still got the same results.  I created a separate measure named FollowedUp4 so I dont overide the original one.  See the 3rd column.  Does the queue column have to be an specific type?  I have it as whole number, sum uncategorized.  

@Anonymous , Can you share the formula use

Anonymous
Not applicable

Here is what you had sent me but I created FollowUp4 

FollowedUP4 =
sumx(Summarize(CSRQTFollowup3, CSRQTFollowup3[Queue],"_dist",
CALCULATE(DISTINCTCOUNT(CSRQTFollowup3[FollowUp]),FILTER(CSRQTFollowup3,CSRQTFollowup3[FollowUp] = 1 ))),[_dist])
 
and queue is a new column:
Capture2.JPG
 
 

 

Ashish_Mathur
Super User
Super User

Hi,

Share the link from where i can download your PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Greg_Deckler
Super User
Super User

OK, so that works, doesn't work, what are you going for?

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

The second column won't sum,  the type is whole number.  I haven't run into this before.  See the column next to it how it adds up to 23,  this second column should add up to 8 but it still says 1 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.