cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

Display difference in clustered column chart

Hi all,

 

I'm finding a way to display difference between two values in my clustered column chat. I have a measure to calculate the difference but don't know how to integrate it to the chart.

 

canada.jpg

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Anonymous
Not applicable

Re: Display difference in clustered column chart

@s15

 

You need year on the axis to achieve what you want, which is why I proposed a new data structure. 

 

My measure looks like this:

 

Population growth =

 

(CALCULATE(SUM(test[Population]); test[Year]=2014) / CALCULATE(SUM(test[Population]); test[Year]=2000)) - 1

 

See picture below. There is 2 types of visualizations. One with clustered bar and another one with clustered chart and trend line. If you hover over the columns, you'll see the population growth. 

 

Population growth.png

View solution in original post

13 REPLIES 13
Highlighted
Microsoft
Microsoft

Re: Display difference in clustered column chart

@s15 wrote:

Hi all,

 

I'm finding a way to display difference between two values in my clustered column chat. I have a measure to calculate the difference but don't know how to integrate it to the chart.

 

canada.jpg

 

@s15

What is your difference measure like? You could probably put the measure to the tooltip field.

By the way, for me, I'd use a line chart. See more details in the attached pbix file.

difference =
CALCULATE (
    DIVIDE (
        SUM ( yourTable[Value] )
            - CALCULATE ( SUM ( yourTable[Value] ), SAMEPERIODLASTYEAR ( 'calendar'[Date] ) ),
        SUM ( yourTable[Value] )
    )
)

Capture.PNG

 

 

 

Highlighted
Helper III
Helper III

Re: Display difference in clustered column chart

@Eric_Zhang

 

I just need to display the difference of growth between year 2000 and year 2014. My dataset contains population of Canada in different years. From my example, the growth rate is 13,42% by the measure below

 

Difference = 1 - (SUM(Population[2000])/SUM(Population[2014]))

 

 

Displaying the difference is helpful to explain my data.

 

I drag and drop my measure into Tooltip but nothing changes.

 

difference.PNG

Highlighted
Anonymous
Not applicable

Re: Display difference in clustered column chart

@s15

 

Can you show us how you've stored your data?

Highlighted
Helper III
Helper III

Re: Display difference in clustered column chart

@Anonymous

 

This is very simple like this

 

canada.PNG

Highlighted
Anonymous
Not applicable

Re: Display difference in clustered column chart

@s15

 

But in your plot you have sum of 2013?

 

Where do you get that from?

Highlighted
Helper III
Helper III

Re: Display difference in clustered column chart

Just typo. You don't have to worry about the year. It is my typo. I just want to display the growth rate in clustered chart.

Highlighted
Anonymous
Not applicable

Re: Display difference in clustered column chart

@s15

 

If you have this data structure:

 

Year   Population Country

2000  10000000  Canada

2014  20000000  Canada

 

You can use this visual: Line & Clustered column chart. Then just plot the according values.

Highlighted
Anonymous
Not applicable

Re: Display difference in clustered column chart

@s15 Did we solve your problem?

Highlighted
Helper III
Helper III

Re: Display difference in clustered column chart

No it is not. Could you please show your screenshot? The chart that @Eric_Zhang is very hard to understand.

 

Thank you.

Helpful resources

Announcements

August Community Highlights

Check out a full recap of the month!

Experience what’s next for Power BI

Join us for an in-depth look at the new Power BI features and capabilities at the free Microsoft Business Applications Launch Event.

Top Solution Authors