cancel
Showing results for 
Search instead for 
Did you mean: 
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
RicoZhou
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 III
Super User III

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
Super User II
Super User II

@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,
DataZoe


See my reports and blog at https://www.datazoepowerbi.com/

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

March Update

Check it Out!

Click here to read more about the March 2021 Updates!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

secondImage

Experience what’s next for Power BI

See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.