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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
knut12212
Regular Visitor

Filter does not apply properly

I have an issue with this function. The function takes the maximum value from the column FC-Werte. The problem is that when I apply a filter, this maximum value does not change. In other words, the filters are not working reliably here. Why is that?

 

That's the measure I am referring to:

Linie FC =
VAR AktuellerMonat =
    SELECTEDVALUE( 'PBI - Nettoaufwand'[Monate (in Zahlen)] )
VAR MaxFCGefiltert =
    MAX ( 'PBI - Nettoaufwand FC'[FC Werte] )  
RETURN
DIVIDE ( MaxFCGefiltert, 12, 0 ) * AktuellerMonat
5 REPLIES 5
v-achippa
Community Support
Community Support

Hi @knut12212,

 

Thank you for reaching out to Microsoft Fabric Community.

 

Thank you @rohit1991@Selva-Salimi and @FBergamaschi for the prompt response. 

 

As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided by the user's for the issue worked? or let us know if you need any further assistance.

 

Thanks and regards,

Anjan Kumar Chippa

FBergamaschi
Solution Sage
Solution Sage

Hello @knut12212 

I would need to check your pbix to understand what you write because it sounds weird. MAX will anyway consider only what the filter context allows to see.

Can you please share the pbix? Also via private message if you prefer.

Best

If this helped, please consider giving kudos and mark as a solution

@me in replies or I'll lose your thread

Want to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page

Consider voting this Power BI idea

Francesco Bergamaschi

MBA, M.Eng, M.Econ, Professor of BI

knut12212
Regular Visitor

Unfortunately, it does not work. I will share my table. Maybe, this way it will be easier to solve my problem.

Filter (Sales Channel -> FOA94), then 300 is the right answer. However, my current measure takes the maximum value from the column FC-Werte 640.

knut12212_0-1757941830537.png

 

Hi @knut12212 

you just need to use calculate( max(....))

 

If this post helps, then I would appreciate a thumbs up and mark it as the solution to help the other members find it more quickly.

rohit1991
Super User
Super User

Hi @knut12212 

I’ve updated my answer below with your reply.

The reason your MAX doesn’t react to filters is because you used it directly:

VAR MaxFCGefiltert =
   MAX ( 'PBI - Nettoaufwand FC'[FC Werte] )

This always scans the entire column. That’s why it doesn’t change.

 

Fix: wrap it with CALCULATE so it respects filter context:

Could you please try this:
MaxCoefficient =
VAR SelChannel = SELECTEDVALUE ( 'PB - Nettoaufwand FC'[Sales Channel] )
RETURN
CALCULATE (
   MAX ( 'PB - Nettoaufwand FC'[C Werte] ),
   'PB - Nettoaufwand FC'[Sales Channel] = SelChannel
)

Example:

  • Without CALCULATE >> Max = 400 (global).
  • With CALCULATE + Filter (Monat=2) >> Max = 300 (filtered).


image.png

 


Did it work? ✔ Give a Kudo • Mark as Solution – help others too!

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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