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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
muhammedaslam02
Frequent Visitor

can we create a bar chart with two criteria that has two different date range value

Is there any way I can create a bar chart number of tickets created and the number of closed tickets per month?As I have different date range columns for these two criteria

I have done an analysis on excel, and I am expecting data like below:

muhammedaslam02_0-1664302980982.png

 

I have tried to create, but numbers are showing by created month tickets date range.

muhammedaslam02_0-1664245997057.png

 



my visualisation value

muhammedaslam02_1-1664245997062.png

 


Count of ticket ID- number of ticket ID

Count of Resolved&Closed = calculate(COUNTROWS(Data),FILTER(Data,Data[Status]="closed”))

Sample data below,

Ticket IDStatusCreated timeClosed timeCreate measure month yearClosed measure month year
220688Closed25/07/2022 5:2426/07/2022 11:56202207202207
214357Closed26/05/2022 11:166/09/2022 9:22202205202209
211330Duplicate26/04/2022 14:48 202204 
216129Duplicate10/06/2022 9:39 202206 
216755Pending16/06/2022 11:40 202206 
210063Pending12/04/2022 11:46 202204 
222231Closed8/08/2022 4:5111/08/2022 10:27202208202208
222716Closed12/08/2022 4:5215/08/2022 8:10202208202208
210771Closed20/04/2022 10:0421/04/2022 8:55202204202204
209592Closed7/04/2022 12:207/09/2022 14:29202204202209
210062Closed12/04/2022 11:455/09/2022 13:54202204202209
210064Closed12/04/2022 11:4923/09/2022 15:00202204202209
213538Closed18/05/2022 9:1515/08/2022 9:16202205202208
216628Closed15/06/2022 10:0918/08/2022 14:56202206202208
220874Closed26/07/2022 13:1411/08/2022 11:07202207202208
212170Closed4/05/2022 14:2718/07/2022 9:30202205202207
211557Closed28/04/2022 15:0726/08/2022 9:22202204202208
223673Closed19/08/2022 7:5131/08/2022 10:54202208202208
1 ACCEPTED SOLUTION
AlexisOlson
Super User
Super User

Creating a date dimension table really helps here.

 

You can use the date dimension for your x-axis and then write measures for your columns like this:

Created Count = 
VAR _Year = SELECTEDVALUE ( Dim_Date[Year] )
VAR _Month = SELECTEDVALUE ( Dim_Date[Month] )
RETURN
    CALCULATE (
        COUNT ( Tickets[Ticket ID] ),
        FILTER ( Tickets, YEAR ( Tickets[Created time] ) = _Year && MONTH ( Tickets[Created time] ) = _Month )
    )

 

See the attached pbix. Preview:

AlexisOlson_0-1664314358181.png

 

View solution in original post

5 REPLIES 5
muhammedaslam02
Frequent Visitor

Thanks for the support and soloution.
I have Changed my barchart to line and clustered coloumn chart.
Can any one help me as I want to add below values to line y axis
1)count of SLA Vilotaed per month
2)Count of "user1" per month

https://www.dropbox.com/transfer/cap_pid_ft:AAAAAB7o9L_Wqu7WvNnrZSWbJumuObCTE3L8mTC16n3_7IXsl3ey6_Y

 

 

 

 

 

I'd recommend creating a new post for this new question and explaining/showing what your desired result should look like.

 

How to Get Your Questions Answered Quickly

AlexisOlson
Super User
Super User

Creating a date dimension table really helps here.

 

You can use the date dimension for your x-axis and then write measures for your columns like this:

Created Count = 
VAR _Year = SELECTEDVALUE ( Dim_Date[Year] )
VAR _Month = SELECTEDVALUE ( Dim_Date[Month] )
RETURN
    CALCULATE (
        COUNT ( Tickets[Ticket ID] ),
        FILTER ( Tickets, YEAR ( Tickets[Created time] ) = _Year && MONTH ( Tickets[Created time] ) = _Month )
    )

 

See the attached pbix. Preview:

AlexisOlson_0-1664314358181.png

 

muhammedaslam02
Frequent Visitor

is there option to create barchart without edit data source. because my rest of the model depends upon this data structure?

Anonymous
Not applicable

I think you'd better transform your sourcing data first when you import. unpivot columns create and closed .

 

Youngli_0-1664249599519.png

 

 

Youngli_2-1664249663002.png

 

Youngli_1-1664249630698.png

 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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