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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
GuillaumeB
Helper I
Helper I

Counting days without Level 4 tickets

I have a list of service tickets that were logged with their date and time. Alongside is their Severity (level 1-2-3-4). I'm trying to figure out a dax formula to count the number of days withing a current month where we had no tickets of severity 4.  I could post what I have now as a formula but it's clearly wrong as it's telling me last month had 174 days without severity 4 tickets. Any help would be welcomed.

2 ACCEPTED SOLUTIONS

Hi @GuillaumeB,

Based on my test, you could refer to below formula:

Measure = CALCULATE(COUNT(Table1[Ticket date]),FILTER('Table1','Table1'[Ticket security level]=1||'Table1'[Ticket security level]=2||'Table1'[Ticket security level]=3),FILTER('Table1','Table1'[Ticket flag]=1))

Result:

1.PNG

 

You could also download the pbix file to have a view.

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Try DISTINCTCOUNT instead of COUNT in the provided pattern.

View solution in original post

7 REPLIES 7
CheenuSing
Community Champion
Community Champion

Hi @GuillaumeB

 

Please share data / data model / pbix on google drive /onedrive and paste the link here.

 

Cheers

CheenuSing

Did I answer your question? Mark my post as a solution and also give KUDOS !

Proud to be a Datanaut!

@CheenuSing I cannot share anything unfotunately as it contains sensitive client information. Here is some info I can share that can help.

In the data model I have a relationship between Calendar Date and Ticket date.

Within Ticket table I have the following relevant fields:

Ticket Date

Ticket Severity level

Ticket Flag (flag used to mark if they should be counted based on other scenarios, 1 means its counted, 0 means its disregarded).

 

So basically I need to count a day all tickets filed that day have a severity level of 1, 2, or 3, and the Ticket Flag is 1. 

Hi @GuillaumeB,

Based on my test, you could refer to below formula:

Measure = CALCULATE(COUNT(Table1[Ticket date]),FILTER('Table1','Table1'[Ticket security level]=1||'Table1'[Ticket security level]=2||'Table1'[Ticket security level]=3),FILTER('Table1','Table1'[Ticket flag]=1))

Result:

1.PNG

 

You could also download the pbix file to have a view.

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

That's roughly what I was trying to make work at first but even when filter for August 2018 for example, I'm getting 38k results.

Try DISTINCTCOUNT instead of COUNT in the provided pattern.

DISTINCTCOUNT with the solution proposed earlier worked! Thank you.

Glad it worked. Can you mark my response as a solution as well? Thanks.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors