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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Cocieto06
Frequent Visitor

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
Cocieto06
Frequent Visitor

The earliest date the ID occurs in the table

hi @Cocieto06 ,

 

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

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 @Cocieto06 ,
 
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?

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 @Cocieto06 ,

 

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

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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