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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Pbiuserr
Post Prodigy
Post Prodigy

Slicer does not trigger card value

Hello, 

Looking for the picture down below P HC supposed to be 0, as I slice on "PermTmpCOD" = T. The measure is standard P HC = CALCULATE ( [HC], PermTmpCOD = "P"). I tried with ALLSELECTED but it didnt work. For the datamodel its standard one to many connection, two tables

 

Pbiuserr_1-1660651383413.png

 

 

1 ACCEPTED SOLUTION
PabloDeheza
Solution Sage
Solution Sage

Hi there!

Try the following:

 CALCULATE ( [HC], KEEPFILTERS( PermTmpCOD = "P" ) )

Let me know if that helps!

View solution in original post

3 REPLIES 3
PabloDeheza
Solution Sage
Solution Sage

Hi there!

Try the following:

 CALCULATE ( [HC], KEEPFILTERS( PermTmpCOD = "P" ) )

Let me know if that helps!

It works! Can you elaborate a little what you've done?

Sure thing!

So, when you apply a "filter" with CALCULATE, you are essencially removing any existing filter applied to the same column, replacing it with the new filter that you defined. If you dont want to lose the existing filter, then KEEPFILTERS comes in handy as it will keep the filter that you applied outside of the measure, and also the filter applied on your CALCULATE function.

For a better understanding of this I suggest reading this posts:

CALCULATE 

KEEPFILTERS 

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

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.