Reply
Balaraju
Helper II
Helper II
Partially syndicated - Outbound

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.

 Screenshot_1.png 

 

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. 

Screenshot_2.png

 

Thanks,

Bala.

 

 

 
 
 

 

 

2 REPLIES 2
Syndicate_Admin
Administrator
Administrator

Source Community: Power BI Spanish | Source Author Name: v-yadongf-msft
Syndicated - Inbound

There @Syndicate_Admin ,

This is my test table:

vyadongfmsft_0-1663741558484.png

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:

vyadongfmsft_1-1663741800028.png

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

vyadongfmsft_3-1663741973847.png

And then condinitional formatting for column's color:

vyadongfmsft_4-1663742063144.png

vyadongfmsft_5-1663742187084.png

vyadongfmsft_6-1663742203624.png

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.

Syndicated - Outbound

@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
avatar user

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

Check out the March 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)