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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Fabric Monthly Update - May 2024

Check out the May 2024 Fabric update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.