Reply
AshishTabade
Frequent Visitor

Power BI - How to show two times/dates on x-axis on clustered column visual.

Hi, I have a data as below

IDOpened DateClosed Date
ABC1231/04/20257/04/2025
PQR12324/03/20257/04/2025
XYZ12331/03/20257/04/2025

 

How can I show the ID in clustered column where one column represent "Opened date" and other as "Closed Date"

I need a visual like below - Blue column - Opened Date and Green column - closed date

Y-axis has ID

 

AshishTabade_0-1744112837444.png

Can you please let me know how is this possible as I can only take one date on x axis and the relationship i have doesnt allow 2 dates.

1 ACCEPTED SOLUTION
v-kpoloju-msft
Community Support
Community Support

Hi @AshishTabade,
Thank you for reaching out to the Microsoft fabric community forum. Thank you @lbendlin, for your inputs on this issue.

After thoroughly reviewing the details you provided, I was able to reproduce the scenario, and it worked on my end. I have used it as sample data on my end and successfully implemented it.

I took sample data my end below mentioned:

vkpolojumsft_0-1744190276147.png

Then, unpivot the Date Columns. Select the Opened Date and Closed Date columns (hold CTRL to multi-select). Right-click and choose Unpivot Columns. Table looks like this below:

vkpolojumsft_1-1744190291757.png

Rename “Attribute” to Date Type, and “Value” to something like Event Date if needed.

Go back to Power BI Report view. Add a Clustered Column Chart. Set up the chart like this: X-Axis: Event Date (or a month/year hierarchy if desired) Legend: Date Type (this will split Opened vs Closed into two colors/bars) Values: Use ID.

Output looks like below:

vkpolojumsft_2-1744190315117.png

Also please refer to the below document for better understanding:
Customize X-axis and Y-axis properties - Power BI | Microsoft Learn

If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.

Thank you for using Microsoft Community Forum.

View solution in original post

3 REPLIES 3
v-kpoloju-msft
Community Support
Community Support

Hi @AshishTabade,
Thank you for reaching out to the Microsoft fabric community forum. Thank you @lbendlin, for your inputs on this issue.

After thoroughly reviewing the details you provided, I was able to reproduce the scenario, and it worked on my end. I have used it as sample data on my end and successfully implemented it.

I took sample data my end below mentioned:

vkpolojumsft_0-1744190276147.png

Then, unpivot the Date Columns. Select the Opened Date and Closed Date columns (hold CTRL to multi-select). Right-click and choose Unpivot Columns. Table looks like this below:

vkpolojumsft_1-1744190291757.png

Rename “Attribute” to Date Type, and “Value” to something like Event Date if needed.

Go back to Power BI Report view. Add a Clustered Column Chart. Set up the chart like this: X-Axis: Event Date (or a month/year hierarchy if desired) Legend: Date Type (this will split Opened vs Closed into two colors/bars) Values: Use ID.

Output looks like below:

vkpolojumsft_2-1744190315117.png

Also please refer to the below document for better understanding:
Customize X-axis and Y-axis properties - Power BI | Microsoft Learn

If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.

Thank you for using Microsoft Community Forum.

Thanks @v-kpoloju-msft for the details. It worked.

lbendlin
Super User
Super User

The DAX function you are looking for is USERELATIONSHIP.

 

Please provide sample data that fully covers your issue - including Y axis values.
Please show the expected outcome based on the sample data you provided.

avatar user

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)