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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.