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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

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
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.