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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Slicer not updating Calculated Measure

I have the following measures:

Type1_Value = CALCULATE(SUM('Table'[Number]), 'Table'[Type] = Type1
Type2_Value = CALCULATE(SUM('Table'[Number]), 'Table'[Type] = Type2

Total_Value = Type1_Value + Type2_Value

 

I have a KPI metric that shows Total_Value, and a slicer for both Type1 and Type2.

 

My problem is that when I click either Type on the slicer, the Total_Value doesn't update to show just that Type.

 

How do I fix this?

 

Thanks!

1 ACCEPTED SOLUTION
v-yueyunzh-msft
Community Support
Community Support

Hi, @Anonymous 

According to your description, you want to add a type slicer but now it dos not work. 

If this , you can try to use keepfilters() fumction , like this:

Type1_Value = CALCULATE(SUM('Table'[Number]),KEEPFILTERS( 'Table'[Type] = Type1))

For more information, you can refer to :
KEEPFILTERS function (DAX) - DAX | Microsoft Learn

 

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

View solution in original post

5 REPLIES 5
tamerj1
Super User
Super User

Hi @Anonymous 

you just need to use

Total_Value = SUM('Table'[Number])

v-yueyunzh-msft
Community Support
Community Support

Hi, @Anonymous 

According to your description, you want to add a type slicer but now it dos not work. 

If this , you can try to use keepfilters() fumction , like this:

Type1_Value = CALCULATE(SUM('Table'[Number]),KEEPFILTERS( 'Table'[Type] = Type1))

For more information, you can refer to :
KEEPFILTERS function (DAX) - DAX | Microsoft Learn

 

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

Anonymous
Not applicable

Perfect! Worked like a charm! Thank you!

Anonymous
Not applicable

Hi,
From what I understand from your mistake, I created a demo for you. If you want to get the sum of the values selected with the filter, you can use the ALLSELECTED function. Another reason why the filters you apply does not change your calculation is because the Total_value calculation may be a calculated column.

 

EzgiAslankara_0-1672599192094.png

 

If these are not the solutions to the problem, you can send me the your dashboard screenshots. If my answer was helpful in solving the problem, I'd appreciate it if you could Accept the solution and get more people to view it.

Anonymous
Not applicable

This solution didn't work for me. I've sent you a message with a screenshot.

 

Thanks for your help!

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

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 community update carousel

Fabric Community Update - June 2025

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