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
IT_inter
Frequent Visitor

tickets backlog: DAX filter and slicer

Hi guys!


I want to creare dashboard for IT tickets backlog with slicer denepding on ticket's urgency.

I have simple data file looking like on screenshot below. I created a dashboard which show amount of created, closed and backlog tickets in certain month (thanks to community) with Date table. DAX formula for backlog also below.

But i also want to be able to filter my backlog charts via slicer visual, and see amount of backlog tickets by urgency. But it doesn't work, as i use filter(all) in DAX. Could someone please help me to understand how can i achieve this goal?

 

Thanks!

 

 

 

backlog = 
var em = ENDOFMONTH('Calendar'[Date])
var f = filter(all(Jira),Jira[creation date]<=em)
var g = filter(all(Jira),coalesce(Jira[resolution date],em+1)<=em)
return countrows(f)-countrows(g)

 

 

 

 

 

IT_inter_0-1667481663063.png

 

1 ACCEPTED SOLUTION

Hi  @v-rzhou-msft

ALLSELECTED() function did the trick.
Thanks a lot for the help!
 

 

 

backlog =
VAR em =
    ENDOFMONTH ( 'Calendar'[Date] )
VAR f =
    FILTER ( ALLSELECTED( Jira ), Jira[creation date] <= em )
VAR g =
    FILTER (
        ALLSELECTED( Jira ),
        COALESCE ( Jira[resolution date], em + 1 ) <= em
    )
RETURN
    COUNTROWS ( f ) - COUNTROWS ( g )

 

 

 

View solution in original post

2 REPLIES 2
v-rzhou-msft
Community Support
Community Support

Hi @IT_inter ,

 

According to your statement, I think you can try ALLEXCEPT() function instead of ALL() in your code.

backlog =
VAR em =
    ENDOFMONTH ( 'Calendar'[Date] )
VAR f =
    FILTER ( ALLEXCEPT ( Jira, Jira[urgency] ), Jira[creation date] <= em )
VAR g =
    FILTER (
        ALLEXCEPT ( Jira, Jira[urgency] ),
        COALESCE ( Jira[resolution date], em + 1 ) <= em
    )
RETURN
    COUNTROWS ( f ) - COUNTROWS ( g )

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Hi  @v-rzhou-msft

ALLSELECTED() function did the trick.
Thanks a lot for the help!
 

 

 

backlog =
VAR em =
    ENDOFMONTH ( 'Calendar'[Date] )
VAR f =
    FILTER ( ALLSELECTED( Jira ), Jira[creation date] <= em )
VAR g =
    FILTER (
        ALLSELECTED( Jira ),
        COALESCE ( Jira[resolution date], em + 1 ) <= em
    )
RETURN
    COUNTROWS ( f ) - COUNTROWS ( g )

 

 

 

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.