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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
richardc1
Helper I
Helper I

How to use slicers with "Open tickets per day"

I am using this DAX measure to show how many tickets were open on each day:

Open Tickets at date =
VAR SelectedDate =
    SELECTEDVALUE ( 'Date Table'[Date] )
RETURN
    CALCULATE (
        DISTINCTCOUNT('All Tickets'[Number]),
        FILTER (
            ALL('All Tickets'),
            'All Tickets'[Opened Date Only] <= SelectedDate
                && (
                    'All Tickets'[Closed Date Only] > SelectedDate || ISBLANK('All Tickets'[Closed Date Only])
                        )
                        )                
        )
   It works fine, no worries there.
BUT, it ignores any slicer choices, I'm not sure why, probably the "ALL" statement?
How would i adjust this to allow for slicers to work?
2 ACCEPTED SOLUTIONS
hansontm
Regular Visitor

Yes this is because of the ALL statement. You can change it to ALLSELECTED() or ALLEXCEPT() functions.

View solution in original post

danextian
Super User
Super User

Hi @richardc1 ,

 

ALL is a table modifier function. It is basically applying the result of your measure to the whole of 'All Tickets' table so any filter coming from the same table will return the same result. It would be better if you provided a workable sample data (not an image) and from that your expected result. Make sure that the both the sample data and expected result cover your use case/scenario and not just bits and pieces of them.










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


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

3 REPLIES 3
danextian
Super User
Super User

Hi @richardc1 ,

 

ALL is a table modifier function. It is basically applying the result of your measure to the whole of 'All Tickets' table so any filter coming from the same table will return the same result. It would be better if you provided a workable sample data (not an image) and from that your expected result. Make sure that the both the sample data and expected result cover your use case/scenario and not just bits and pieces of them.










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


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
hansontm
Regular Visitor

Yes this is because of the ALL statement. You can change it to ALLSELECTED() or ALLEXCEPT() functions.

Awesome, thanks for that!

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.