Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago

How to Control the Bar Orders

 

How do I control the bar order? (I wanna group things that fall into a category adjacent to each other)

 

Thanks. 

 

2 Replies

  • Uzi2019's avatar
    Uzi2019
    Icon for Community Champion rankCommunity Champion

    Hi Anonymous 
    you can create custom column by adding numbers against each value. like
    1. Dairy
    2. Breakfast
    3. Lunch
    etc.
    You can use switch statement like below:


    Initially I have similar chart but want to sort the legend according to my sorting order.

    Created calculated column

    Sorting = SWITCH(TRUE(),
                WOW[Campaign Type]="SPONSORED_DISPLAY", "1.SPONSORED_DISPLAY",
                WOW[Campaign Type]="SPONSORED_PRODUCT","2.SPONSORED_PRODUCT",
                WOW[Campaign Type]="SPONSORED_BRAND_VIDEO","3.SPONSORED_BRAND_VIDEO",
                WOW[Campaign Type]="SPONSORED_BRANDS","4.SPONSORED_BRANDS"
                )
     



    If my post helps please give kudos and accept it as a solution!
    thanks