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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
jprdynamicapps
Helper IV
Helper IV

Filter replacement inside matrix with visual filter

I have a matrix displaying a sum of sales quantity and I have a slicer picking date periods. 

 

I am displaying the sum of sales qty.  I am also displaying the sum of sales for all dates (using ALL()) and that is working fine.

 

I am also attempting to show the sales quantity for date period 1 inside the matrix as a baseline and that is not working.  I expected my stated filter context to replace the existing filter context, but it seems to be getting intersected.  If date period 1 is in the slicer selection, it displays correctly, but if date period 1 is not, it is blank. 

 

I hope I'm just doing something silly here, but if this can't work for some reason, I would have to remove the visual filter and then "manually" apply the slicer to the salesqty.  I tried that in the second matrix but couldn't get that working either.

 

Appreciate any assistance.  PBIX at https://www.dropbox.com/s/vgpvkq36k3uo9lg/baseline%20inside%20matrix%20with%20slicer.pbix?dl=0.

Thanks.

-jpr

 

 

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

You may download my PBI file from here.  In both tables, you had dragged the fields from the wrong tables.  Also, i have corrected your measure.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

You may download my PBI file from here.  In both tables, you had dragged the fields from the wrong tables.  Also, i have corrected your measure.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thanks, Ashish.  As you noticed, I did something wrong that which looked right to my inexperienced eye.

Adding a filter in calculate is done as in line 1 below, not as in line 2 below.

Thank you.

SalesInPeriod1 = calculate(sum([SalesQty]),'dim DatePeriod'[DatePeriod]=1)
SalesInPeriod1 = calculate(sum([SalesQty]),FILTER('dim DatePeriod',[DatePeriod]=1))

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.