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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Zemotard
Frequent Visitor

How to build this chart with inbound ticket & outbound ticket on same bar

Dear all,

I would like to create a chart showing the Inbound tickets & outbound tickets by month.

In my example, I have 4 records

 

Open DateClosing Date
15/09/2024 08:42       15/09/2024 08:33
15/09/2024 08:16        15/10/2024 08:33
15/10/2024 07:32        15/10/2024 08:33
15/10/2024 08:10      21/10/2024 08:33

 

I would like a chart with open date & closing date on the same bar.

Outbound tickets should be negative

The months sould be in X axis, and qty in Y  then with this recordset,  I should have 2 tickets opened in september, 2 in october.

And 1 ticket closed in september and 3 in october.

 

open        2                      2

        0--------------------------0

 closed   -1                      -3

 

             Sept             Oct

 

 

Could you help me ?

 

Thanks

 

2024-10-15 19_11_22-Window.jpg

1 ACCEPTED SOLUTION
Lucas_LP
Resolver I
Resolver I

Hi Zemotard!

My suggestion is to:
First, select both columns in PQuery and click unpivot them, leaving you with this table:
Attribute          Date

Open Date9/9/2024
Closing Date9/9/2024
Open Date9/9/2024
Closing Date10/10/2024
Open Date10/10/2024
Closing Date10/10/2024
Open Date10/10/2024
Closing Date10/10/2024

 

Second, close and apply query, go to "Table View", create new column (this column could also be done in PQuery if you prefer). Use this DAX formula:

Value =
IF('Table (2)'[Attribute]="Open Date", 1, -1).

Finally, set the visual as follows:
Lucas_LP_1-1729019318103.png

 

You can change "Closing Date" and "Open Date" by renaming the columns before unpivoting them, or by using a find replace in PQuery for the attribute column. Or creating another column.


 Is this what you needed?

View solution in original post

3 REPLIES 3
OktayPamuk80
Responsive Resident
Responsive Resident

Hi,

You can create a calendar in Power Query, match it with the existing table by creating a new table and create flags in order to sum it. It is harder to explain, so I created an samle file for you:

https://drive.google.com/drive/folders/1-1hilkkcjEjc451A7XMAVJtU701LqY3W?usp=sharing

 

Depending on your source data, you can adjust it or create it more dynamically.

Regards,
Oktay

 

 

Did I answer your question? Then please mark my post as the solution.

If I helped you, click on the Thumbs Up to give Kudos.

Lucas_LP
Resolver I
Resolver I

Hi Zemotard!

My suggestion is to:
First, select both columns in PQuery and click unpivot them, leaving you with this table:
Attribute          Date

Open Date9/9/2024
Closing Date9/9/2024
Open Date9/9/2024
Closing Date10/10/2024
Open Date10/10/2024
Closing Date10/10/2024
Open Date10/10/2024
Closing Date10/10/2024

 

Second, close and apply query, go to "Table View", create new column (this column could also be done in PQuery if you prefer). Use this DAX formula:

Value =
IF('Table (2)'[Attribute]="Open Date", 1, -1).

Finally, set the visual as follows:
Lucas_LP_1-1729019318103.png

 

You can change "Closing Date" and "Open Date" by renaming the columns before unpivoting them, or by using a find replace in PQuery for the attribute column. Or creating another column.


 Is this what you needed?

Thanks Lucas_LP, I use your method, and this works perfectly !!

Thanks again  🙂

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors