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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
TimeStampz101
New Member

Count Timestamps in Multiple Date Columns and plot by month

 

Hello,

 

I have the following dataset which comprises timestamps for 3 key project milestones:

 

Dataset:

 

Project

[Text]

Department

[Text]

Start Timestamp [Date]

Review Timestamp

[Date]

Complete Timestamp

[Date]

Project 1EngineeringMarch 1, 2023March 15, 2023April 2, 2023
Project 2EngineeringMarch 2, 2023April 2, 2023April 5, 2023
Project 3Supply ChainApril 15, 2023April 20, 2023April 21, 2023
Project 4QualityMay 16, 2023  

 

I would like to manipulate this dataset in PowerBI in order to count the number of projects in each month that achieved a particular milestone.  The following table is the desired output for the sample dataset above:

 

Desired Output to create clustered column graph:

 

MonthCount StartCount ReviewCount Complete

February

Engineering

Supply Chain

Quality

0

0

0

0

0

0

0

0

0

0

0

0

March

Engineering

Supply Chain

Quality

2

2

0

0

1

1

0

0

0

0

0

0

April

Engineering

Supply Chain

Quality

1

0

1

0

2

0

1

1

3

2

1

0

May

Engineering

Supply Chain

Quality

1

0

0

1

0

0

0

0

0

0

0

0

...   

 

In PowerBI I created a calendar table and set relationships to the Start (active), Review, and Complete timestamps. As I can only have 1 active relationship, I had to create measures for Review and Complete with USERELATIONSHIP( ).

 

Review Count by Start Date = CALCULATE [Review Count] USERELATIONSHIP ( Table'[Start Timestamp] 'Calendar Table'[Date] ) )

 

Unfortunately this is not working for me and I am getting the following output:

 

MonthCount StartCount ReviewCount Complete

[Blank]

Engineering

Supply Chain

Quality

0

0

0

0

3

1

1

1

3

2

1

0

February

Engineering

Supply Chain

Quality

0

0

0

0

0

0

0

0

0

0

0

0

March

Engineering

Supply Chain

Quality

2

2

0

0

0

0

0

0

0

0

0

0

April

Engineering

Supply Chain

Quality

1

0

1

0

0

0

0

0

0

0

0

0

May

Engineering

Supply Chain

Quality

1

0

0

1

0

0

0

0

0

0

0

0

...   

 

As you can see, only the Start Timestamps are being properly displayed. Review and Complete are not - they are showing up under [blank] month.

 

I would appreciate any advice or guidance in how to approach this problem. Thank you!

2 REPLIES 2
TimeStampz101
New Member

Thank you for the reply AmitChandak! I have confirmed all of the columns are formated as Date and not Date/Time. I also reviewed all the data and there is no time in any cell.

 

Any other ideas?

amitchandak
Super User
Super User

@TimeStampz101 , Make sure none of the timestamps has time. If so Create truncated dates nad join those with date table

 

Review Date = Datevalue(Table[Review Timestamp])

 

https://radacad.com/userelationship-or-role-playing-dimension-dealing-with-inactive-relationships-in...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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