Forum Discussion

Balaraju's avatar
Balaraju
Icon for Helper III rankHelper III
3 years ago

Highlight the Bar based on line chart values

Hi All,

 

I have one requirement i.e I have line chart showing that month wise promoter sales and Bar chart showing that top 5 Promoter Sales.

 

You can see below screenshot we have 3 promoters in line chart under store A and Top 5 promoters in bar chart, Promoter 1002 and 1003 are present under top 5 Prometer list in Bar chart.

  

 

Now the actual requirement is I want to see who so ever promoter reflecting in line chart and Bar chart should be highlighted with another color. you can see the below output image. 

 

Thanks,

Bala.

 

 

 
 
 

 

 

2 Replies

  • There @Syndicate_Admin ,

    This is my test table:

    Please try following DAX to create measures:

    Sum of sales = SUMX(FILTER(ALL('Table'),'Table'[Promoter ID] = SELECTEDVALUE('Table'[Promoter ID])),'Table'[Sales])
    
    Rank = RANKX(ALLSELECTED('Table'),[Sum of sales],,DESC,Dense)
    
    Grey = IF(MAX('Table'[Promoter ID]) = "1002" || MAX('Table'[Promoter ID]) = "1003","Grey")

    Create a line chart and put [Promoter ID] in filters like below image shown:

    Create a stacked column chart and put [Rank] in filters like below image shown:

    And then condinitional formatting for column's color:

    Best regards,

    Yadong Fang

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

    • Balaraju's avatar
      Balaraju
      Icon for Helper III rankHelper III

      Syndicate_Admin Thank you for your update, but it is not suitable for me, could you please check my table below I have different stores if i am going to select another store other promoters information is visible at line chart if the promoters in line chart is present top 5 promoters bar chart I want to see the grey color for bar.

       

      Promoter IDStore NameMonthSales 
      1001AJan-22100
      1001AFeb-22150
      1001AMar-22250
      1002AJan-22350
      1002AFeb-22250
      1002AMar-2250
      1003AJan-22300
      1003AFeb-22200
      1003AMar-2250
      1004BJan-22150
      1004BFeb-22250
      1004BMar-2250
      1005BJan-22300
      1005BFeb-22200
      1005BMar-2250
      1006BJan-22100
      1006BFeb-22150
      1006BMar-22250
      1007CJan-22300
      1007CFeb-22250
      1007CMar-2250
      1008CJan-22300
      1008CFeb-22200
      1008CMar-2250
      1009CJan-22350
      1009CFeb-22250
      1009CMar-22150