Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Between slicer with categories

For a project I am working on I have an age group of bills with a certain due date. I created groups for them that calculates the amount of days left until they need to be paid. I want the user to use a between slicer that shows the groups, but since it is categorical data and not number related it doesn't work. 

 

So in this case I want "Verleden" (Past in english) to be the minimum and ">30" to be the maximum.

 

I don't know if I'm missing something obvious, but I cant seem to find the right way to do it.

 

Thank you in advance!

  • Hi Anonymous 

    You didn't miss anything.
    Slicer between can work only with ranges of numeric / date data types.

    Groups that you created are texts, so you can use only lists/buttons/dropdown types slicers.

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

  • Hi Anonymous 
    I think that the answer is no, unfortunately.

    But maybe a card with catching selections near the slicer can help.
    Something like that :

    I attached a pbix , if it helps you can follow my steps.

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



  • Anonymous's avatar
    Anonymous
    2 years ago

    Whilst I haven't found a proper solution, I have created a workaround. I connected a table containing the order in which I need the categories (1-5) with the corresponding categories. I created the between slicer with these numbers but set the value color to the background so it doesn't show. Then I overlayed it with 2 card visuals. One with the lowest selected category, one with the maximum. The DAX formula is as follows:

     

    MinimumCategorieContracten =
    IF(MIN(VolgordeContracten[Volgorde])=1,
    "Verleden",
    IF(MIN(VolgordeContracten[Volgorde])=2,
    "<11",
    IF(MIN(VolgordeContracten[Volgorde])=3,
    "<21",
    IF(MIN(VolgordeContracten[Volgorde])=4,
    "<31",">30"))))
     
     
    Same goes for Maximum, but obviously with MAX().
     
    I know this isn't optimal but it does work.
    If anyone has any improvements, please do tell!
     
     

5 Replies

  • Hi Anonymous 

    You didn't miss anything.
    Slicer between can work only with ranges of numeric / date data types.

    Groups that you created are texts, so you can use only lists/buttons/dropdown types slicers.

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

    • Anonymous's avatar
      Anonymous
      Not applicable

      So there is no way to link integers from 1-5 to the categories, and use them as a between slicer but make it display the group name rather than the integers?

      • Ritaf1983's avatar
        Ritaf1983
        Super User

        Hi Anonymous 
        I think that the answer is no, unfortunately.

        But maybe a card with catching selections near the slicer can help.
        Something like that :

        I attached a pbix , if it helps you can follow my steps.

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



  • Anonymous's avatar
    Anonymous
    Not applicable

    Whilst I haven't found a proper solution, I have created a workaround. I connected a table containing the order in which I need the categories (1-5) with the corresponding categories. I created the between slicer with these numbers but set the value color to the background so it doesn't show. Then I overlayed it with 2 card visuals. One with the lowest selected category, one with the maximum. The DAX formula is as follows:

     

    MinimumCategorieContracten =
    IF(MIN(VolgordeContracten[Volgorde])=1,
    "Verleden",
    IF(MIN(VolgordeContracten[Volgorde])=2,
    "<11",
    IF(MIN(VolgordeContracten[Volgorde])=3,
    "<21",
    IF(MIN(VolgordeContracten[Volgorde])=4,
    "<31",">30"))))
     
     
    Same goes for Maximum, but obviously with MAX().
     
    I know this isn't optimal but it does work.
    If anyone has any improvements, please do tell!