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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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

Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Top Kudoed Authors