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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.