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

Removing all filters except one

Hi all,

 

I'm sorry if this is a basic question, however I'm new to DAX and still only just getting my mind around it...

 

I have a series of report pages with different filters on them, as follows:

PAGE1 -> Production[date] = Today()

PAGE2 -> Production[date] = Today(), Production[line] = 1

PAGE3 ->Production[date] = Today(), Production[line] = 2

 

I have visual displaying a summary measure, for which I'd like to remove all filters EXCEPT the line filter, however I cannot make this work.

At the moment, my measures are as follows:

 

Total Output := SUM( Production[output] )

Yesterday Output = CALCULATE(
    [Total Output],
    Production[date] = Today() - 1,
    ALLEXCEPT(Production, Production[line])
)

From everything I've read, I believed ALLEXCEPT would remove everything except the Production[line] filter, however the measure is returning blank when the page date filter is applied.

 

Any help would be appreciated!

 

3 REPLIES 3
v-rzhou-msft
Community Support
Community Support

Hi @rmcmun 

Please check whether there is a value in the 'output' in line you filtered in page filter.

If there is a value in 'output' in the line you filtered, it won't shown blank.

You can try my measure as well, it works well in my sample:

Yesterday Output = 
VAR Line = VALUES(Production[Line])
Return
CALCULATE(
    [Total Output],
    FILTER(ALL(Production),Production[Line] in Line&&Production[Date]=[Today]-1)
)

If this reply still couldn't help you solve your problem, please share a sample without sensitive data with me by your Onedrive for Business. And show me a screenshot of your issue and the result you want. This may make it easier for me to understand your requirement.

 

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. 

 

 

 

PhilipTreacy
Super User
Super User

Hi @rmcmun 

I can't reproduce your issue with my sample data set.  Can you please provie your PBIX file.

 

Download my sample PBIX file if you want to check it out.

 

As you can see from this data I can create measures for Total Output and Yesterday Output that return the correct values

tot-o.png

line-1.png

yest-o.png

Regards

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


DataZoe
Employee
Employee

@rmcmun Are you filters on the pages in the filter pane? You could try to filter each page with a slicer instead to get your ALLEXCEPT to work, instead of using the filter pane.

Respectfully,
Zoe Douglas (DataZoe)



Follow me on LinkedIn at https://www.linkedin.com/in/zoedouglas-data
See my reports and blog at https://www.datazoepowerbi.com/

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.