Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Taking min and max values

I have a table with a numeric field. I need to create a slicer with the min and max of the values.

Slider does not consider the max amt value from the table.
Is there a way to dynamically do this to include both the min and max values?

  • Hi Anonymous ,

     

    Try the following formula:

     

     

    forRounding = 
    UNION(
        GENERATESERIES(
            MIN(testM[amt]),
            MAX(testM[amt]),
            1000000
        ),
        DISTINCT(
            SELECTCOLUMNS(
                testM,
                "Value", MAX(testM[amt])
            )
        )
    )

     

     

     

    If you use 1000000 as the increment value of the sequence, then one problem is that even if you can display all the values in the slicer, only the values that exist in the forRounding table are valid.

    For example, I choose the value range 2012404 - 5976154 in the slicer, but its actual filtering range is 2567897-5567897. Does this meet your expected output?

     

     

    If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

    Best Regards,
    Winniz

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

1 Reply

  • v-kkf-msft's avatar
    v-kkf-msft
    Icon for Community Support rankCommunity Support

    Hi Anonymous ,

     

    Try the following formula:

     

     

    forRounding = 
    UNION(
        GENERATESERIES(
            MIN(testM[amt]),
            MAX(testM[amt]),
            1000000
        ),
        DISTINCT(
            SELECTCOLUMNS(
                testM,
                "Value", MAX(testM[amt])
            )
        )
    )

     

     

     

    If you use 1000000 as the increment value of the sequence, then one problem is that even if you can display all the values in the slicer, only the values that exist in the forRounding table are valid.

    For example, I choose the value range 2012404 - 5976154 in the slicer, but its actual filtering range is 2567897-5567897. Does this meet your expected output?

     

     

    If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

    Best Regards,
    Winniz

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.