#Tableau

Ғылым және технология

In this tip, I show you two methods for how I color BANs based on whether there is a positive or negative change. The first method colors the entire BAN, whereas the second method only colors the value of the change itself.
Download the workbook here - www.vizwiz.com/2022/05/ban-co...

Пікірлер: 12

  • @MrDavekatz
    @MrDavekatz2 жыл бұрын

    I generally use the SIGN function as there are three possibilities -- increase, decrease, or no change. So SIGN( SUM([Latest Year Sales]) - SUM([Prior Year Sales]) ) would return 1 for an increase in sales, -1 for a decrease, and 0 for no change.

  • @vizwiz

    @vizwiz

    2 жыл бұрын

    Ah nice! I always forget about that option.

  • @TH-vw4qn
    @TH-vw4qn2 жыл бұрын

    Love this tutorial. Thanks, Andy!

  • @Fannie2uN2010
    @Fannie2uN20102 жыл бұрын

    A big thank you Andy

  • @BI-Rahul
    @BI-Rahul2 жыл бұрын

    Excellent!

  • @jstewart_1
    @jstewart_12 жыл бұрын

    Nice

  • @JD_018
    @JD_018 Жыл бұрын

    Hi Andy - How can I handle instances whereby the % change calculation returns NULL so it dissappears from my view all together which isn't what I want. I'd rathr it show "--"

  • @vizwiz

    @vizwiz

    Жыл бұрын

    I'd wrap the calc in the ZN function. Then when it comes to formatting, use this custom format 0.0%;-0.0%;- The third part of this number format is for formatting zero. So ZN will turn the null to zero, then the number format will display it as -

  • @JD_018

    @JD_018

    Жыл бұрын

    @@vizwiz Hi Andy, that is what I have done. Calculation is: ZN(([Selected Period])-ZN([Previous Period ])) / ZN([Previous Period ]) In addition, I've used your formatting instructions but the calc dissappears all together when null :(

  • @vizwiz

    @vizwiz

    Жыл бұрын

    @@JD_018 That makes sense. If your previous period (denominator) return 0, you should get null since you can't divide by zero.

  • @JD_018

    @JD_018

    Жыл бұрын

    @@vizwiz can’t I not handle this instance in a way that returns “- -“ rather than it disappearing from the view all together?

  • @vizwiz

    @vizwiz

    Жыл бұрын

    @@JD_018 I don't think so because you are getting an invalid result.

Келесі