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
Anonymous
Not applicable

How to distinct count IDs based on first Occurance date and visualize it

Dear All, 

 

I am not able to find a solution to following issue 

I have a table with multiple columns - with ID, date, description, ... 

I need to calculate the total distinct IDs - for only the earliest occurance by date - so I can visualize it per year/month based only on the earliest occurance.

Now the column chart gets mixed up with the dates. 

 

ID DateDescription ... 
111/11/2023Not relevant  
112/11/2023  
210/11/2023  
211/11/2023  
35/11/2023  
46/11/2023  

 

example graph

2023-11-28_14h56_40.png

 

Hope it is a bit clear. 

 

Kind regards

 

6 REPLIES 6
Anonymous
Not applicable

The earliest date the ID occurs in the table

hi @Anonymous ,

 

Could you enrich your sample data to well reflect your case and with the corresponding expected result?

Anonymous
Not applicable

Hello 

Table1

IDOperationTimestampDescription ... 
1start11/11/2023 
1stop 11/11/2023 
1start12/11/2023 
2start14/11/2023 
2stop15/11/2023 
3start20/11/2023 
3stop21/11/2023 
start22/11/2023 
4start15/11/2023 
4stop16/11/2023 

 

 

result

IDoperationTime 
1Start11/11/2023
2start14/11/2023
3start20/11/2023
4start15/11/2023
   
COUNT total IDs  

 

Afterwards

Use count IDs in graph in y-axis

and use timestamps of only table 2 for X-axis (linked with date table to show by year/month) 

the one from table two will all be seen in the 2023/11 column (block of 4 - since total is 4 units)   

hi @Anonymous ,
 
Could you enrich your sample data to well reflect your case and with the corresponding expected result?
 
e.g. if id 1 appeared in Nov and Dec, is it counted only in Nov or?

Anonymous
Not applicable

Cocieto06_0-1701255259716.png

so i have these ID with that earliest event - this date is related to a data table with Year/month column. But I am not able to Visualise it because indeed units that start in oktober are seen in November and vice versa 

 

FreemanZ
Super User
Super User

hi @Anonymous ,

 

what do you mean by "earliest occurance by date "?

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!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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.