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
Anonymous
Not applicable

Help with a filter

Hi, I've a table like this

 

CLIENT_ID     JUNY   JULY    AGOUST

      1                 10       20        25

      2                  5        15        10  

      3                  20       10        5

 

I want to create a filter like this:   JUNY < &VARIABLEINSLICER& || JULY < &VARIABLEINSLICER& || AGOUST < &VARIABLEINSLICER&.  

 

 I want the client could choose the &VARIABLEINSLICER& scrolling a slicer.

 

How can I doi it?

 

Thanks

5 REPLIES 5
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous,

 

If I understand your requirement correctly that you want to get the output like below.

 

Capture.PNG

 

You could use the Parameter slicer to filter the value.

 

If that is your desired, you could refer to the steps below.

 

1. Create the What if Parameter under Modeling>> New Parameter then set the default values.

 

2. Create the measure with the formula below.

 

Measure =
VAR june =
    CALCULATE (
        MAX ( 'Table1'[Value] ),
        FILTER ( ALLEXCEPT ( Table1, 'Table1'[Client ID] ), 'Table1'[Month] = "June" )
    )
VAR july =
    CALCULATE (
        MAX ( 'Table1'[Value] ),
        FILTER ( ALLEXCEPT ( Table1, 'Table1'[Client ID] ), 'Table1'[Month] = "July" )
    )
VAR august =
    CALCULATE (
        MAX ( 'Table1'[Value] ),
        FILTER ( ALLEXCEPT ( Table1, 'Table1'[Client ID] ), 'Table1'[Month] = "August" )
    )
RETURN
    IF (
        'Parameter'[Parameter Value] > june
            || 'Parameter'[Parameter Value] > july
            || 'Parameter'[Parameter Value] > august,
        1,
        0
    )

3. Then you could put this measure under visual level filter like below.

 

 visual level.png

 

More details, you could refer to the attachment.

 

If you need further help, please share your desired output so that we could help further on it. 

 

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi @v-piga-msft!

 

Thanks for your answer, Its exactly what I want, but I have one column per month instead of a month column with the june, july...values. I dont have value column and a generic month column. I dont know if I'm explaining myself properlySin título.png

Thanks for all! This would be very usefull for me

Hi @Anonymous,

 


Thanks for your answer, Its exactly what I want, but I have one column per month instead of a month column with the june, july...values. I dont have value column and a generic month column. I dont know if I'm explaining myself properly


For your scenario, you could change your data model in Query Editor.

 

Select the per month column and Click Unpivot Columns, then rename the Attribute to Month.

 

You could find these steps in my attachment for the first reply.

 

Best  Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

@v-piga-msftAnd is any solution without pivoting the table? I would like to have my table as now.

Anonymous
Not applicable

Hi, I've a table like this

 

CLIENT_ID     JUNY   JULY    AGOUST

      1                 10       20        25

      2                  5        15        10  

      3                  20       10        5

 

I want to create a filter like this:   JUNY < &VARIABLEINSLICER& || JULY < &VARIABLEINSLICER& || AGOUST < &VARIABLEINSLICER&.  

 

 I want the client could choose the &VARIABLEINSLICER& scrolling a slicer.

 

How can I doi it?

 

Thanks

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.