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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
julieTE
Frequent Visitor

tooltip always on in line and stacked column chart

Hi, 

 

I am trying to get those 2 charts combined : I would like the bars of the 2nd coloured as in the 1rst. ( see picture )PBI.PNG

When I add the type in the column series field, I get this 2nd picture. I would like the blue quantity to remain as before, I don't understand the change in look.

PBI2.PNG

 

Should that not be possible, I would at least like to see the type of the bars always visible, as if the tooltips could be always visible, without needing to point at the data.

 

Is there any way to get one of those solutions ?

 

Thanks in advance, 

 

Best regards, 

 

Julie

1 ACCEPTED SOLUTION
v-sihou-msft
Employee
Employee

@julieTE

 

In your first image. The "Tps darret" in that column chart is sliced by Type (your Legend) so that you can get multiple color of bars. But in that line chart, you just put "Tps darret" and "Qty" into Value, they are not sliced by any data field. The context in both chart are different. So in your combo chart, when you put Type into Legend, both "Tps darret" and "Qty" will be sliced by this field. That's the reason whey you can't get the line before. 

 

For your requirement, you should modify a measure for Qty. Just add "ALL(Table[Type])" into filter. 

 

Qty for all Types =
CALCULATE ( SUM ( Table[Qty] ), ALL ( Table[Type] ) )

Regards,

 

 

View solution in original post

2 REPLIES 2
v-sihou-msft
Employee
Employee

@julieTE

 

In your first image. The "Tps darret" in that column chart is sliced by Type (your Legend) so that you can get multiple color of bars. But in that line chart, you just put "Tps darret" and "Qty" into Value, they are not sliced by any data field. The context in both chart are different. So in your combo chart, when you put Type into Legend, both "Tps darret" and "Qty" will be sliced by this field. That's the reason whey you can't get the line before. 

 

For your requirement, you should modify a measure for Qty. Just add "ALL(Table[Type])" into filter. 

 

Qty for all Types =
CALCULATE ( SUM ( Table[Qty] ), ALL ( Table[Type] ) )

Regards,

 

 

I didn't get the expected result, but I got the logic and it is now working as I wanted to.

Not all  Qty lines have a "Tps darret " value since

Tps d'arrêt measurement = DATEDIFF(SUM(Downtime[debut]);SUM(Downtime[fin]);MINUTE) and my Qty lines don't have a Downtime[fin] value.

Instead of using a measurement I added a column for "Tps darret " to get each lines' value, which is a duration type of total minutes. I replaced the null values by 0 and it's working fine.

Thank you very much.

 

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.