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

Why calculated column stops working if I use an external filter?

I have some Fact Revenue, I am trying to group by Conca, and display the values only if negative…

 

 

For doing it I have this calculated column:

 

 

=

VAR name1 = Revenue[Conca]



VAR name2=



    CALCULATE (

        SUM ( Revenue[CostOfQuality] ),

         FILTER ( Revenue, Revenue[Conca] = name1  )

    )



RETURN

if (name2>0, 0, Revenue[CostOfQuality])

 

 

 

 

It works:

(highest value is 0 as expected).

ovonel_0-1669727238048.png

 

 

 

 

But if I drag fiscal year it stops working:

ovonel_1-1669727238053.png

 

 

 

Why is it that I see numbers higher than 0?? (I want it to still work even if I bring other filters...)

 

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous  ,

 

You can try the following code I modified:

Var name2= CALCULATE (



        SUM ( Revenue[CostOfQuality] ),Filter(Revenue,Revenue[Conca] =EARLIER(Revenue[Conca]))



    )





RETURN



if (name2>0, 0, Revenue[CostOfQuality])

 

 

 Best Regards,

Yolo Zhu

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

johnt75
Super User
Super User

Calculated columns are only calculated during data refresh, so they don't pay any attention to filters or slicers. If you want the results to dynamically react to filters and slicers you need to create a measure, not a calculated column.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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