Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Alternating colours for BAR Graph with single measure without any conditional formatting

Hi All,

 

I have a requirement where i need to show alternating colour in bar graph which has only single measure (salesamount) in Values and the AXIS(Customer) around 5000 Customer. there is no condional formatting requirement, just need to show 2 diff colours in alternating format.

 

any work around for this?

 

Thanks in Advance.

Suyog

  • Anonymous , Try like  

    sales amount

    Rank = rankx(allselected(Table[Customer]), [sales amount])

     

    // sales amount is a measure  

     

    Color = 

    var _1 = mod([Rank],2) 

    return 

    if(_1,=1, "Blue", "Green")

     

    You need use conditional formatting using field value option with this measure 

5 Replies

  • Anonymous , No, you have to use conditional formatting to get this.

     

    May be create a rank on customer and measure and use mod with 2 and us that in conditional formatting

    • Anonymous's avatar
      Anonymous
      Not applicable

      amitchandak how can we achieve this with conditional format?  i just need to show alternating colour bars. i dont have any specific condition. 

      • amitchandak's avatar
        amitchandak
        Icon for Super User rankSuper User

        Anonymous , Try like  

        sales amount

        Rank = rankx(allselected(Table[Customer]), [sales amount])

         

        // sales amount is a measure  

         

        Color = 

        var _1 = mod([Rank],2) 

        return 

        if(_1,=1, "Blue", "Green")

         

        You need use conditional formatting using field value option with this measure