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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
tuncay
Helper III
Helper III

Only consider one filter

I want to show in a chart, the best value of a Factory within a Division.

 

I tried that, but I get 0 value in the chart.

With the same function, when I put it into a Card, then I can see the best value...

 

issue.PNG

1 ACCEPTED SOLUTION

@tuncay seems like there's another filter applied somewhere. Can you try to add an ALL to your main table and see if any info comes out?

VAR div = SELECTEDVALUE('Organizational Unit'[Division])
VAR BiC = CALCULATE(MAX('KPI data'[Value]), ALL('KPI data'), ALL('Organizational Unit'), KEEPFILTERS('Organizational Unit'[Division] = div))

 

I'm grabbing at thin air since I can't really explore and see what your model looks like ^__^. 



Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

View solution in original post

13 REPLIES 13
tuncay
Helper III
Helper III

bump

 

Putting same function as a mesure and showing on card.. everything works

Doing this for the chart, no value can be seen...

tuncay
Helper III
Helper III

does someone have an idea?

@tuncay hard to tell what the issue is without seeing your model, but ALL or ALLSELECTED should work. How about this?

VAR div = SELECTEDVALUE('Organizational Unit'[Division])
VAR BiC = CALCULATE(MAX('KPI data'[Value]), ALL('Organizational Unit'), KEEPFILTERS('Organizational Unit'[Division] = div))

 



Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

still not working...

it's not showing in the chart as a column, but when I put the exact same code to a card, I can see the correct value...

@tuncay seems like there's another filter applied somewhere. Can you try to add an ALL to your main table and see if any info comes out?

VAR div = SELECTEDVALUE('Organizational Unit'[Division])
VAR BiC = CALCULATE(MAX('KPI data'[Value]), ALL('KPI data'), ALL('Organizational Unit'), KEEPFILTERS('Organizational Unit'[Division] = div))

 

I'm grabbing at thin air since I can't really explore and see what your model looks like ^__^. 



Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

thank you very much, it finally worked!!!

hehee, i'm glad it worked out! Enjoy!



Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!
vanessafvg
Super User
Super User

is getdiv supposed to be a number or a value?





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




a value, it should filter the division (e. g. "A" or "B")

 

I tried also the following, does not work:

var BiC = CALCULATE(MAX('KPI data'[Value]), FILTER(ALLSELECTED('Organizational Unit'), [Division]))

it should filter based on one value or multiple?

 

VAR div =
    SELECTEDVALUE ( 'Organizational Unit'[Division] )
VAR BiC =
    CALCULATE (
        MAX ( 'KPI data'[Value] ),
        FILTER ( 'Organizational Unit', 'Organizational Unit'[Division] = div )





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




it still does not show any value...

or this

var BiC = CALCULATE(MAX('KPI data'[Value]), ALLEXCEPT('Organizational Unit','Organizational Unit'[Division]))

 

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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