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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
washrodrigues
Frequent Visitor

Show the same amount of filtered values ​​for all rows

Hey Guys!

I'm trying to create a behavior where I can check how many values have been filtered and then change the measure behavior.

It works when I'm using SELECTEDVALUE, but as the value in the filter comes from the same dimension that I'm using in the table rows, then for each row the function is showing kind of just one value selected, just in the total row, it shows multiple values selected.

I'd like to have "multi" in all rows.

Is it possible to change this behavior? 

 

washrodrigues_0-1723483866179.png

 

 

1 ACCEPTED SOLUTION
NaveenGandhi
Super User
Super User

Hi @washrodrigues 

It would be better if you share some sample data along with expected outpt as screenshot to understand the problem better.

But see if below measure helps.

Selected =
VAR __selected =
    CALCULATE (
        DISTINCTCOUNT ( 'Table'[Category] ),
        ALLSELECTED ( 'Table'[Category], 'Table'[Production class] )
    )
RETURN
    SWITCH ( TRUE (), __selected > 1, "multi", SELECTEDVALUE ( 'Table'[Category] ) )

NaveenGandhi_0-1723486587713.png



If this post helps, then please consider Accept it as the solution to help the others find it more quickly. Appreciate you kudos!!

Follow me on LinkedIn!!!

 



View solution in original post

2 REPLIES 2
washrodrigues
Frequent Visitor

That's perfect! Thank you so much!

NaveenGandhi
Super User
Super User

Hi @washrodrigues 

It would be better if you share some sample data along with expected outpt as screenshot to understand the problem better.

But see if below measure helps.

Selected =
VAR __selected =
    CALCULATE (
        DISTINCTCOUNT ( 'Table'[Category] ),
        ALLSELECTED ( 'Table'[Category], 'Table'[Production class] )
    )
RETURN
    SWITCH ( TRUE (), __selected > 1, "multi", SELECTEDVALUE ( 'Table'[Category] ) )

NaveenGandhi_0-1723486587713.png



If this post helps, then please consider Accept it as the solution to help the others find it more quickly. Appreciate you kudos!!

Follow me on LinkedIn!!!

 



Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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