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
abdul_kalam84
Frequent Visitor

Total distinct count not matching with individual status count

I am new to Power BI and DAX. Need help on below scenario

I am loading weekly incident files into PowerBI, which has incident number ,status and weekending date.

However same incident number can repeat with different status in other week file .

when I do distinct incident count form all files, I am  getting 262 count but when displaying status wise count getting more .

Its understandable due to status change, incident number is duplicating but not sure how to match total distinct and category wise count. Please suggest.

 

abdul_kalam84_0-1607196104457.png

 

3 REPLIES 3
AlB
Super User
Super User

@abdul_kalam84 

If you want the 3 at the total just use:

 
Measure = DISTINCTCOUNT(Table1[IncidentID ])

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

 

SU18_powerbi_badge

abdul_kalam84
Frequent Visitor

Hi @AlB 

Thank you.

Below is my dataset structure , I am calculating distinct YTD count based on weekenddate.   Here I am getting count is 3 which is correct .

but when display YTD by status, I am getting Open - 2, Closed-2  so total is 4 instead of 3 .How to handle this.

 

IncidentID    Status   WeekendDate

--------         ------     -------------
1234            Open      07-11-2020
5678           Closed     07-11-2020
1234           Closed     14-11-2020
4567           Open       14-11-2020

AlB
Super User
Super User

Hi @abdul_kalam84 

Measure TOT =
SUMX ( DISTINCT ( Table1[CurrentStatus] ), [YTDSOSub] )

 

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

 

SU18_powerbi_badge

 

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.