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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
AmitDarak
New Member

Numeric parameter slicer not working properly

Hi,

 

I have created a Numeric range parameter and using the values of that parameter in slicer.

 

Then I have created a basic measure with switch function. Measure works correctly for 3 values in parameter, but does not work correctly for rest.

It displays correct value when slicer value is 0.7 ,0.75,0.8. But it does not show correct value for 0.85, 0.9, 0.95. By default selects 600. 

 

Not sure of this behavior. Any help would be highly appreciated.

 

AmitDarak_0-1750161224570.png

 

Regards,

Amit

1 ACCEPTED SOLUTION
miTutorials
Super User
Super User

Use the round function for precise matching like below.

 

Measure = SWITCH(ROUND(Parameter[Parameter Value],2),
                             0.70,  100,
                             0.75,  200,
                             0.80,  300,
                             0.85,  400,
                             0.90,  500,
                             0.95,  600,
                             1000) 

View solution in original post

3 REPLIES 3
v-tsaipranay
Community Support
Community Support

Hi @AmitDarak ,
Thank you for reaching out to the Microsoft fabric community forum. 

 

Use the below DAX in Modeling--New Table, and enter:

Tendency1 =

DATATABLE(

    "Tendency Value", DOUBLE,

    {

        {0.7},

        {0.75},

        {0.8},

        {0.85},

        {0.9},

        {0.95}

    }

)

Use this Measure:

test_measure =

SWITCH(

    INT(SELECTEDVALUE('Tendency1'[Tendency Value]) * 100),

    70, 50,

    75, 100,

    80, 200,

    85, 400,

    90, 500,

    95, 600

)

 

To display the result, first add a Slicer visual to the report and drag the 'Tendency'[Tendency Value] column into it. Set the slicer style to Dropdown or Horizontal for better readability. Then, add a Card visual and drag the test_measure into it to show the output based on the selected slicer value.

 

I am also including .pbix file for your better understanding, please have a look into it:

Hope this helps. Please reach out for further assistance.

If this post helps, then please consider to Accept as the solution to help the other members find it more quickly and a kudos would be appreciated.


Thank you.

miTutorials
Super User
Super User

Use the round function for precise matching like below.

 

Measure = SWITCH(ROUND(Parameter[Parameter Value],2),
                             0.70,  100,
                             0.75,  200,
                             0.80,  300,
                             0.85,  400,
                             0.90,  500,
                             0.95,  600,
                             1000) 

Hi,

 

Isn't this strange? It worked correctly for 0.70, 0.75, 0.8 but not working for 0.85, 0.9, 0.95.

 

Any possible explanation for this logic?

 

Regards,

Amit

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors