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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
flaglerkid
New Member

Count by Date & Time for Multiple Date Columns

Hello,

 

I have data provided to me that I am trying to transform into a stacked area chart by time of arrival. The data set is similar to the following format:

 

NameStatus1-Jan2-Jan3-Jan
John SmithApproved1/1/2018 15:30  
Jane DoePending Approval1/1/2018 16:301/2/2018 10:00 
Mary SmithApproved  1/3/2018 9:00

 

My desired outcome is to have a stacked area chart with the Legend represented by the Status column and a continuous hierarchical time scale along the bottom that allows me to drill into each day and see a count of the arrivals by day or by hour depending on the level of drill.

 

The solution is not as simple as merging the columns because one row may have data in two different day columns.

 

I cannot modify the data source so I need to transform the data within the query editor or create a calculated field in some way.

 

I am comfortable with DAX expressions but this seems to be a little beyond my current skills. I have never written R-scripts before so if that is the right tool for this then I will need to do some studying up on that.

 

Any help you can provide would be greatly appreciated.

1 ACCEPTED SOLUTION
MattAllington
Community Champion
Community Champion

It seems to me that you could unpivot the date columns in power query. That would give you a date column and a time column. From there it should be easier



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.

View solution in original post

1 REPLY 1
MattAllington
Community Champion
Community Champion

It seems to me that you could unpivot the date columns in power query. That would give you a date column and a time column. From there it should be easier



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors