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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

make table unaffected by slicer except one column

Hi all,

 

is it possible to have a table (execpt one column ) completely unaffected by the slicers on a page?

 

I have a table with two columns 1.a list of products 2. the sales for those products. 

 

I want to add a third column called 'sales for selected period' 

 

I want the list of products and the sales columns to remain unaffected when I use a date slicer but I want the sales for selected period column to change.

 

is this possible?

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Can you use interaction instead.

https://docs.microsoft.com/en-us/power-bi/create-reports/service-reports-visual-interactions

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

11 REPLIES 11
Greg_Deckler
Super User
Super User

@Anonymous - Yes, don't have your slicer connected to your visual. (Edit Interactions) Create a measure for the one value in your visual that grabs the value(s) in the slicer and returns a result accordingly.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler  I am using a relative date slicer, what would be the best approach to create the meaure? If has one value?

 

thank you!

@Anonymous - It's really hard to say. You should be able to do something like:

 

Measure = 

  VAR __SlicerValues = 'SlicerTable'[SlicerColumn]

RETURN

 ...

 

Once you have the values, you can get the min or max of those and filter by these min's and max's or you might use IN operator. Hard to say without knowing your data and what you are trying to calculate.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler  thanks for the reply.

 

I am just trying calculate the distinct count for a column for the period selected in the relative slicer. 

 

so now I have a table with data and a relative slicer that is not interacting with the table (turned off the interaction).

 

Now I need to create the measure to do a distinct count of a column called [TransactionID] by the [CustomerID]. 

 

then when I put the measure in the table i need the relative slicer to interact with only the created measure 

 

does that make a little more sense ?

OK, so probably something along the lines of:

 

Measure =
  VAR __MaxSlicer = MAX('Slicer'[Column])
  VAR __MinSlicer = MIN('Slicer'[Column])
RETURN
  COUNTX(DISTINCT(SELECTCOLUMNS(FILTER('Table',[Date] >= __MinSlicer && [Date] <= __MaxSlicer),"TransactionID",[TransactionID])),[TransactionID])


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler  this returns the correct value when i put it into a card visual. but when i add it to the table the value reverts back to the unfiltered value. Thank you for your efforts its greatly appreciated

@Anonymous - Hmmm, thinking about this, you may have to reverse the logic. Make the slicer affect the visual. Write a measure for each column that you don't want to be affected by the slicer that uses ALL or ALLEXCEPT for example.

 

I think the reason is that once the slicer does not affect the visual, any measure executing within the context of the visual loses all context for the slicer. So, from the context of the visual, the slicer is always "all" in effect. Painful.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler I cannot all or allexecpt to work, how would you suggest writting it for a category column?

Anonymous
Not applicable

got it, wow i dont know how i missed that . thank you

amitchandak
Super User
Super User

@Anonymous , Can you use interaction instead.

https://docs.microsoft.com/en-us/power-bi/create-reports/service-reports-visual-interactions

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

@amitchandak right, but I still have a column in the table I want to change when I use the date slicer

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.