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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
msimmonsmcse
Helper I
Helper I

Issue with DistinctCount and displaying count

I have a table that lists ticket_number as the primary key, each with a unique number. Each ticket has a date_opened and a date_closed value. Those valuses are DATE format. I wanted to have a bar chart visual that would show how many tickets where opened by day. I have tried both making a measure with CALCULATE(DISTINCTCOUNT(table[ticket_number]) and I have tried just adding the date_opened field in the X-Axis and ticket_number in the Y-Axis with the summarization set to DISTINCTCOUNT. Both give me the result below with appears to simply show a slice for each ticket, with hundreds of slices for each day, not an aggregated number. I have also seen the same behavior with visualizing the data as a table - it just lists multiple lines of the same date opened value with a count value of 1. How can I get it to show the aggreagated count for each date?

 

2023-05-05 10_11_10-Ticket Statistics Gauges - Power BI and 4 more pages - Work - Microsoft​ Edge.png

1 REPLY 1
lbendlin
Super User
Super User

Those valuses are DATE format. 

Doesn't look like it.  Maybe the display format is Date but the column format is DateTime.  Use DATEVALUE() to strip away the time part.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors