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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
jdogcisco
Resolver I
Resolver I

Plotting Open/Closed in same table/graph...

Hello,

 

I am importing a single csv ("issues") of case/ticket date. Each row is a case and its details including, but not limited to...

Ticket #, Opened, Closed
1, 1/2/18, 1/5/18
2, 1/3/18,
3, 1/4/18, 1/5/18

So, every row has an "Opened" date, but not every row has a "Closed" date.

 

I've read some other posts around this area, but I'm just not getting the data to look right.

I created a separate "Calendar" table and created relationships to the "Date" field with the "Opened" and "Closed" fields in the "issues" table.

 

I created two measures...

CreatedCount = COUNTROWS(issues)

ClosedCount = CALCULATE(COUNTROWS(issues),USERELATIONSHIP('Calendar'[Date],issues[Closed]),NOT(ISBLANK(issues[Closed])))

 

When I add these measures to a table or chart, I only see a single value.  Not a count per date period...

 

Screen Shot 2018-06-07 at 6.30.47 PM.png

 

 

At one point, I did get the "CreatedCount" to list the count per year, but then that stopped working and I dont' know why. I never got the "ClosedCount" to work.

 

Any help is appreciated.

1 ACCEPTED SOLUTION

Hi,

 

So, I appreciate the reply.  I'm not entirely sure why this worked, but to solve this I needed to change my "Created" column (the timestamp of when the case was opened) and "Closed" column from datetime to date. I'm not sure why this worked.  Maybe because the time never lined up with the time in the Calendar table and reducing the timestamp to just a date allowed it to find a match. Not sure.  Regardless, exhausting....haha

 

Screen Shot 2018-06-08 at 8.02.30 AM.png

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

You can try to use the following DAX to get the ClosedCount

 

ClosedCount = CALCULATE(COUNTROWS(Issues),FILTER(Issues,ISBLANK(Issues[Closed])<>FALSE()))

2018-06-08_9-56-36.png

 

 

 

Thanks for the reply.  That just give me a single number like the command I previously listed for "ClosedCount".  But, rather than the closed count, it gives me the open count (because it's counting the blanks).

 

The expected output is like below (taken from another post here):

Screen Shot 2018-06-07 at 8.21.38 PM.png

 

But what I'm getting are just a single, total number (I used your suggestion for the "ClosedCount" column:

Screen Shot 2018-06-07 at 8.23.30 PM.png

Anonymous
Not applicable

Do you want the following results shown in the table? Did you try the Matrix by expending the data?

 

2018-06-08_14-45-13.png 

 

 

 

Hi,

 

So, I appreciate the reply.  I'm not entirely sure why this worked, but to solve this I needed to change my "Created" column (the timestamp of when the case was opened) and "Closed" column from datetime to date. I'm not sure why this worked.  Maybe because the time never lined up with the time in the Calendar table and reducing the timestamp to just a date allowed it to find a match. Not sure.  Regardless, exhausting....haha

 

Screen Shot 2018-06-08 at 8.02.30 AM.png

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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