SUM function in power bi showing the wrong value in Visual(LINE AND STACKED COLUMN CHART) but displaying correct value in the CARD

Viewed 987

Example: You can see the measure [Fig 2] value should be 3 on top on the column instead it's highlighted at 2 [Fig 5].

The measure should add the value 1+2=3 just like [Fig 1] and show on top

Testt - Table name, Values-Column1, Success-Column2, total test - Measure name [Fig 4]

total Measure i created to add "Values" 2 columns, created measure "total test" based on values column Total should be 3

1 Answers

Let me state the problem. How to make a line and stack column chart that will show

  1. sales split by category, say by products, on the bars
  2. total sales with lines, at the top of the bars.

You need two measures:

For bars (column values):

sales = SUM( T[value] )

For lines (line values):

sales_total = CALCULATE( SUM( T[value] ), REMOVEFILTERS( T[product] ) )

The sales_total which you put on the line is supposed to return the sum of all products so we need to remove the "row context".

enter image description here

Related