Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
sbkrishblr
Frequent Visitor

stacked chart

HI

 

I have Measures A & B on stacked Y axis and Measure C on Line Yaxis chart. and i have months  as X axis.

 

i am using stack and Line chart.

 

i want measure B to be sliced within based upon some status.

 

you can see below, i am reporting sales from unit A & unit B as two measures on Y axis. i want Unit B to be sliced within by sales person.

 

Unit A measure should show as full without any slicing.

 

how can we do it.

sales.PNG

1 ACCEPTED SOLUTION

Hi @sbkrishblr,

 

I would do the following changes to your information:

 

Create a calendar table

 

Unit A table:

  1. Add Columns:
    1. Salesman - Blank
    2. Unit - "Unit A"

Unit B Table

  1.  Add Columns:
    1. Unit - "Unit B:" & Salesman

Append Table A with table B having a single table (Sales) with:

  1. Month
  2. Sales
  3. Salesman (for Unit A this values will be blank)
  4. Unit

Connect the Calendar table with the Sales table and with the Target table 

 

Make the chart with the following setup

  1. X-axis - Date from Calendar
  2. Column Series - Unit
  3. Column values - Sales
  4. Line Values - Company Target

Final result below:

Bar_chart.png

 

Regards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português





View solution in original post

6 REPLIES 6
sbkrishblr
Frequent Visitor

please find the sample data.

 

Stacked ChartUnit A Sales
 Unit B Sales
  
LineCompany Target

 

MonthUnit A Sales
Jan-17200
Feb-17300
Mar-17200
Apr-17200
May-17300
Jun-17200
Jul-17200
Aug-17300
Sep-17200
Oct-17200
Nov-17300
Dec-17

200

 

 

 

MonthUnit B SalesSalesMan
Jan-1750Tom
Jan-1770Harry
Jan-17100Jack
Feb-1760Tom
Feb-1750Harry
Feb-1730Jack
Mar-1750Tom
Mar-17100Harry
Apr-1765Jack
Apr-1755Harry
May-17160Tom
May-1750Harry
May-17100Jack
Jun-1730Tom
Jun-17110Jack
Jul-1750Tom
Jul-1770Harry
Jul-17100Jack
Aug-1760Tom
Aug-17150Harry
Aug-17130Jack
Sep-17150Tom
Sep-17100Harry
Oct-1780Jack
Oct-1790Harry
Nov-17160Tom
Nov-17150Harry
Nov-17150Jack
Dec-17200Tom
Dec-17200Jack
   

 

MonthCompany Target
Jan-17600
Feb-17600
Mar-17800
Apr-17800
May-17800
Jun-17900
Jul-17900
Aug-17900
Sep-17900
Oct-171000
Nov-171000
Dec-171000

Hi @sbkrishblr,

 

I would do the following changes to your information:

 

Create a calendar table

 

Unit A table:

  1. Add Columns:
    1. Salesman - Blank
    2. Unit - "Unit A"

Unit B Table

  1.  Add Columns:
    1. Unit - "Unit B:" & Salesman

Append Table A with table B having a single table (Sales) with:

  1. Month
  2. Sales
  3. Salesman (for Unit A this values will be blank)
  4. Unit

Connect the Calendar table with the Sales table and with the Target table 

 

Make the chart with the following setup

  1. X-axis - Date from Calendar
  2. Column Series - Unit
  3. Column values - Sales
  4. Line Values - Company Target

Final result below:

Bar_chart.png

 

Regards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português





Hi,

 

thanks for replying with your solution. we also did it exactly the same way... but when we select the filter for any of the unit B- salesman, the block gets highlighted, and rest other blocks including ( unit A block & unit B- other salesman ) gets grayed out.

 

What we want is, when we click on one unit B- Salesman ( say Unit B - Tom), then only unit B - Jack & unit B - Harry blocks should grey out, Unit A should not be grayed out.

 

Hope my point is clear.

 

thanks,

suresh K

Hi @sbkrishblr,

depending on your exact requirements, you may be able to achieve something close to what you are asking using the tecnique in the answer in the below post. By using a parameter table you can customize visual selection behavior using a slicer and vsiual filters.

 

https://community.powerbi.com/t5/Desktop/Dynamic-column-based-on-slicer/m-p/268231#M120994

Hi @sbkrishblr,

That is not possible since the seceval colours in the graph are relating only to one salesman you can' do it with a songle click only with CRTL+ click on the different values you want.

Regards,
MFelix

Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português





MFelix
Super User
Super User

Hi @sbkrishblr,

 

Can you share some sample data?

 

Regards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português





Helpful resources

Announcements
Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.