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
Anonymous
Not applicable

Ignore slicers and add separate filter

Hi everybody.

 

I have a particularly hard problem, that i just can't solve myself.

 

I have a bunch of sales in my dataset that i use dateslicers to filter. That works like a charm. But for one of my measures i want it to ignore the lower dateslicer in my daterange. So my measure takes all sales from the beginning of my data until the last date set by my daterange slicer. I've gotten close, but when i use ALL, ALLEXCEPT etc. I can't get it to accept my new filter (makes sense).

2019-03-12_1112.png

I'd be happy to clarify further if needed. 🙂

5 REPLIES 5
MFelix
Super User
Super User

Hi @Anonymous ,

 

You need to make a measure similar to this:

 

Measure ignoring Filter =
CALCULATE (
    SUM ( Table[Column] );
    FILTER ( ALL ( Table[Date] ); Table[Date] <= MAX ( [Table[Date] ) )
)

 

What is happening in this formula is that we are checking the date selection on your slicer and then picking up all the values that are lower than the maximum date this way excluding minimum date.

 

Regards,

MFelix


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



Anonymous
Not applicable

Thanks for the reply @MFelix 

 

That still doesn't work.

In the coming pictures i have used your calculation on the column named "Kredit Balance".

The other column named "Kredit Bevægelse" is just a sum of my sales amount. You can see my calculation here.

Finansposter[Posting Date is the date the sale was posted, and Dato[Date] is my datetable. 

Finansposter[Amount] is the amount of the sale ofcourse. 

4.png

In the first photo there is no filter on the dates. The whole daterange is accounted for.

It shows the same number as it should.

 1.png

 

Then if i move the max of my daterange and slice the top it still shows the same number, as it should.

2.png

 

But! When i move the lowest date of my daterange and slice it, i would like the column "Kredit Balance" to have the same number as in the previous photo, but it still changes.

 

3.png

 

 

Hi @Anonymous ,

 

Are the columns Finansposter[Posting Date] and Dato[Date] related with each other or are this two separate tables without any relationship?

 

Regards,

MFelix


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



Anonymous
Not applicable

Hi @MFelix ,

 

The two tables are related.

5.png

Hi @Anonymous ,

 

Your measure should be redone to this:

 

Kredit Balance = CALCULATE(
SUM(Finansposter[Amount]);
FILTER (ALL(Dato[Date]); Dato[Date] <= MAX(Dato[Date]) )

)

I'm assuming you slicer is based on the table Dato.

 

Regards,

MFelix


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



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.