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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
DemingPDCA
Helper II
Helper II

Count Number of Tickets Opened Each Day

I was able to create a count of Net tickets by day using the following formula (based on a youtube video I found), and it works GREAT!

Total DMRs = 
    CALCULATE(
        COUNT('Distinct DMR'[DMR])
        , 'Distinct DMR'[Open Date] <= MAX('Calendar'[Date])
        && ('Distinct DMR'[Close Date] > MAX('Calendar'[Date]) || ISBLANK('Distinct DMR'[Close Date]))
    )

 

Shows me the total tickets Open rolling by day for the last 12 months:

DemingPDCA_0-1677868623859.png

 

I want to be able to create the chart below though, and tried using this formula, but it ends up blank. How am I overcomplicating this? 😞 It feels like this one should be easier and I'm probably making it too hard! Sorry

Total Opened = 
    CALCULATE(
        COUNT('Distinct DMR'[DMR])
        , 'Distinct DMR'[Open Date] = MAX('Calendar'[Date])
    )

 

DemingPDCA_2-1677868714443.png

 

 

 

 

 

1 ACCEPTED SOLUTION
sevenhills
Super User
Super User

I guess you are looking for:
a) Active .. Total DMRs
b) Opened ... Opened DMRs
c) Closed ... Closed DMRs

 

Per your post, you said this is working fine: (I assumed that Active is working fine)

 

a) Active (Same copy of your above measure, no changes)

 

Total DMRs =
CALCULATE(
     COUNT('Distinct DMR'[DMR])
        , 'Distinct DMR'[Open Date] <= MAX('Calendar'[Date])
          && ('Distinct DMR'[Close Date] > MAX('Calendar'[Date]) || ISBLANK('Distinct DMR'[Close Date]))
)

 

b) Opened

 

Opened =
CALCULATE(
       COUNT('Distinct DMR'[DMR]),
       USERELATIONSHIP('Calendar'[Date], 'Distinct DMR'[Open Date])
)

 


c) Closed

 

Closed =
CALCULATE(
       COUNT('Distinct DMR'[DMR]),
       USERELATIONSHIP('Calendar'[Date], 'Distinct DMR'[Close Date])
)

 

 

View solution in original post

9 REPLIES 9
sevenhills
Super User
Super User

I guess you are looking for:
a) Active .. Total DMRs
b) Opened ... Opened DMRs
c) Closed ... Closed DMRs

 

Per your post, you said this is working fine: (I assumed that Active is working fine)

 

a) Active (Same copy of your above measure, no changes)

 

Total DMRs =
CALCULATE(
     COUNT('Distinct DMR'[DMR])
        , 'Distinct DMR'[Open Date] <= MAX('Calendar'[Date])
          && ('Distinct DMR'[Close Date] > MAX('Calendar'[Date]) || ISBLANK('Distinct DMR'[Close Date]))
)

 

b) Opened

 

Opened =
CALCULATE(
       COUNT('Distinct DMR'[DMR]),
       USERELATIONSHIP('Calendar'[Date], 'Distinct DMR'[Open Date])
)

 


c) Closed

 

Closed =
CALCULATE(
       COUNT('Distinct DMR'[DMR]),
       USERELATIONSHIP('Calendar'[Date], 'Distinct DMR'[Close Date])
)

 

 

Figured it out - thank you!!! My Open Date was actually a date time, and I needed to add the .[Date] to it when I pulled it over to make sure it was not looking for Date/Time on the calendar Date!

Did it worked ? 

 

If yes, post the snapshot of working results, so that future members can see the completed details 🙂 Also , mark it as solution. Thanks

 

 

Worked great - thanks!

DemingPDCA_0-1678112909753.png

 

I tried this prior, but end up loosing my date somehow when I do this.

 

My data structure looks like this:

DemingPDCA_0-1677871931052.png

When I try the suggestion I get this:

DemingPDCA_1-1677871968482.png

But yes - you are exactly right on when I am trying to do! Thanks!

 

Not sure - but is it something to do with me having my relationships set up wrong?

DemingPDCA_2-1677872036156.png

 

 



I think the relationships are causing as wrong. I noticed the Open Date having time. I assume similarly Close Date has time for not null values.

 

To resolve, can you have Open Date and Close Date as "Date" data type and then do the relationships again. Same way, but as date data type.

 

Open Date to Calendar Date

Close Date to Calendar Date 

 

 

 

*looking at this 10 minutes ago would have been helpful 😄 

Thanks so much!

🙂

 

 

andhiii079845
Solution Sage
Solution Sage

Can you share please some more underlaying data structure?

How is opened and closed is calculated.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.