Forum Discussion

bendsteel6's avatar
bendsteel6
Helper I
4 years ago

Parameter As Filter?

I have a simple table with 4 columns, namely vehicle (VIN), a coverage Id (COV_ID) and START and END miles for the coverage.  A vehicle can have multiple coverages with different start and end mileages.  I simply want to have the ability for the user to enter the exact vehicle mileage for the vehicle, then have the table show which coverages are still in effect based on the user entered vehicle mileage.   What would be the best method to do this realizing the mileages can go from 0 - 10,000,000?  Is a parameter the best way to go?  If so, how would I define it?  Is there a better way to filter against user input?

5 Replies

  • mahoneypat's avatar
    mahoneypat
    Microsoft Employee

    You could add a What-If parameter to your report, so the user could select a value from that, and create a measure to filter the results where the selected value on the slicer is >= start miles && <= end miles.

     

    Pat

     

  • Hi Pat,

    Thanks for the info!  My struggle now is that with 'user input' numbers going from 0 to more than 10,000,000 (vehicle mileage), the 'What-if' parameter only allows so many unique values, so it's making increment the number by 100 if I want to use numbers up to 999,999.  If I went to 10,000,000 it would make me increment them by 1,000.  Do you know of any way around that?  Note: I'm a Power BI novice at best.

    Thanks!

  • v-luwang-msft's avatar
    v-luwang-msft
    Community Support

    Hi bendsteel6 

     I can reproduce your problem, as searched, it is said "it's because of the range being too big and the numbers are being sampled" accoding to the following link.

    What if parameter help - input changes by itself after hitting enter

     

    As a workround, you could click on the "down" arrow on the top-right of slicer and select "between" or "list" as below

     

     

     

    Did I answer your question? Mark my post as a solution!


    Best Regards

    Lucien

     

    • bendsteel6's avatar
      bendsteel6
      Helper I

      Hi,

      I cannot use a 'dropdown' or 'list' as there are over 1M values.  I used 'between'.  It's not ideal but at least I can input a number that won't change when I hit 'enter'.  I've read many other posts regarding this and it seems there is no direct answer for this problem yet.

      Thanks.

      • v-luwang-msft's avatar
        v-luwang-msft
        Community Support

        Hi bendsteel6 ,

        Yes, other than that, no other way was found. Of course, if you find a better way, you can share it and mark it to help more people with the same problem.

         

        Best Regards

        Lucien