Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Conditional formating for bar chart in histogram

hello, I created a histogram which displays the sales for this year and last year for each month, the dark blue color is 2023 and the light blue color is 2022. For the month of November and December, I have forecast for 2023, so I would like to highlight it separtely by changing the color or to grid those two columns, is there a way to do it, something like in the following image for Oct/Nov and Dec...

 

 

 

Thanks a lot for your help in advance!

Ekta

  • dk_dk's avatar
    dk_dk
    2 years ago

    ah yeah of course... 

    I found this other thread that describes the same issue but it seems that the intended behaviour is not possible with the clustered column chart.

    Some other threads say to set the value to null, instead of 0 (in the two measures you created) that may be worth a try?

7 Replies

  • Hi Anonymous ,

    The solution I can think of would be that you separate the Sales actuals (sales that already happened, for months closed) and the Forecasted sales (for months not yet closed) into two different measures. I understand that right now [Sales YTD Value] contains it all. I would instead create two measures (using CALCULATE), one where you show Sales YTD Value only for months that are closed, and 0 for the other months, and then another measure when you show 0 for months that are close, and Sales YTD Value (the forecast) for months not yet closed. Then you can visualise 3 measures together and format them separately.

  • Anonymous's avatar
    Anonymous
    Not applicable

    hello dk_dk , good idea, I did it but it leaves a gap between two columns for the actual sales: 

     

     

    Any workaround for this?

     

    Thanks, 

    Ekta

    • dk_dk's avatar
      dk_dk
      Super User

      Could you apply a Visual level filer with the condition that [Measure] >0 for both measures?

      • Anonymous's avatar
        Anonymous
        Not applicable

        dk_dk It did not work, the moment I am filtering on both, the page goes blank, if i am filtering > 0 only for actual sales, I don't see the forects part and vice versa