avatarRenee LIN

Free AI web copilot to create summaries, insights and extended knowledge, download it at here

2014

Abstract

ePOWTohK5CyA.png"><figcaption></figcaption></figure><p id="e342">Refer to my previous post to update the look of the line chart.</p><figure id="ccf0"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*lzZUZHzv3bAfEoRy9E4poA.png"><figcaption></figcaption></figure><p id="483d">We can see sales in 2023 are higher than in 2022 and 2021; hopefully, there will be an increasing trend like last year. <b>However, we can’t see an increased ratio. </b>We could introduce bars and turn this line chart into a sentiment trend chart.</p><h1 id="8dd2">2. Sentiment trend chart</h1><p id="a258">Simply change the chart type to the line and clustered column chart. Adding three measures:</p><div id="11a1"><pre><span class="hljs-attr">SumSales</span> = Sum(sales[Seasonally adjusted (<span class="hljs-variable">m</span>)]) <span class="hljs-attr">LastYearSales</span> = Calculate([SumSales],DATEADD(DATESYTD(sales[Month]),-<span class="hljs-number">1</span>,YEAR)) <span class="hljs-attr">yoy</span> = ([SumSales]-[LastYearSales])/[LastYearSales]-<span class="hljs-number">1</span></pre></div><figure id="b4f6"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*k1J1AMDVo1hsFeL_o9WY9g.png"><figcaption></figcaption></figure><p id="9c98">Now, it’s more apparent that in the middle of 2022, the sales jumped compared to 2021. It only compares the adjacent two years, so I updated the “LastYearSales” to “MinYearSales”(the sales of the smallest year), and update “yoy” to use this new measure.</p><div id="bebc"><pre>MinYearSales <span class="hljs-operator">=</span> VAR SelectedYearsTable <span class="hljs-operator">=</span> ALLSELECTED(sales[<span class="hljs-keyword">Month</span>].[<span class="hljs-keyword">Year</span>]) VAR MinYear <span class="hljs-operator">=</span> MINX(SelectedYearsTable, [<span class="hljs-keyword">Year</span>]) <span class="hljs-keyword">RETURN</span> CALCULATE( <span class="hljs-built_in">SUM</span>(sales[Seasonally adjusted (m)]), sales[<span class="hl

Options

js-keyword">Month</span>].[<span class="hljs-keyword">Year</span>] <span class="hljs-operator">=</span> MinYear )

yoy <span class="hljs-operator">=</span> ([SumSales]<span class="hljs-operator">-</span>[MinYearSales])<span class="hljs-operator">/</span>[MinYearSales]<span class="hljs-number">-1</span></pre></div><figure id="a8b5"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*SRGrFH28xNJxEcQ1f3bvhg.png"><figcaption></figcaption></figure><h1 id="7998">3. Updating the colours</h1><p id="f668">I picked orange for the line and updated the column colours referring to GPT’s suggestions.</p><figure id="55a6"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*g36y5SDDBEnT_FFWgLkCtw.png"><figcaption></figcaption></figure><figure id="d39a"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*-qny0hMo9oT3Ief_YG_PNA.png"><figcaption></figcaption></figure><p id="4b5d">That’s it. You could play around the other colours.</p><figure id="8ffd"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*faNhmAtVdFA1Q-z4pwrSHQ.png"><figcaption></figcaption></figure><p id="31a0">Similar posts on this topic:</p><ol><li><a href="https://reneelin2019.medium.com/top-3-powerbi-dashboard-report-examples-865b4879603f">Top 3 PowerBI Dashboard/Report Examples</a></li><li><a href="https://reneelin2019.medium.com/beautify-the-powerbi-reports-383c1acfcf80">Beautify the PowerBI Reports — Basic Graphs</a></li><li><a href="https://readmedium.com/beautify-the-powerbi-reports-maps-570dddf23c9c">Beautify the PowerBI Reports — Maps</a></li></ol><p id="e648">If you liked posts like this, you might also like a <a href="https://reneelin2019.medium.com/membership"><b>Medium</b></a><b> </b>membership. It’s only $5 a month, but it will give you unlimited access to articles while supporting your favourite writers. If you sign up using this <a href="https://reneelin2019.medium.com/membership"><b>link</b></a><b>,</b> I’ll earn a small commission. Thanks!</p></article></body>

Beautify the PowerBI Reports — Year-on-year Charts

Year-on-year (YoY) charts allow us to compare the performance against the same period in previous years, which is essential for evaluating business performance. It also helps to eliminate skewed perceptions caused by season-specific surges or dips in sales or other metrics(e.g. Xmas), delivering a more accurate understanding of the business’s actual performance trajectory.

  1. The simplest multiple lines chart
  2. Sentiment trend chart reflecting the increased ratio
  3. Updating the colours

Use the data from the government on cafes, restaurants and takeaway food services here.

https://www.abs.gov.au/statistics/industry/retail-and-wholesale-trade/retail-trade-australia/latest-release

1. The simplest multiple lines chart

This is the most straightforward way to compare the performance of the current year and last year's performance. As shown above, there is only one line with a continuous line by default. By dragging the “Year” as the legend, we can get multiple lines instantly.

It’s better to add a filter allowing the selection of “Year”

Refer to my previous post to update the look of the line chart.

We can see sales in 2023 are higher than in 2022 and 2021; hopefully, there will be an increasing trend like last year. However, we can’t see an increased ratio. We could introduce bars and turn this line chart into a sentiment trend chart.

2. Sentiment trend chart

Simply change the chart type to the line and clustered column chart. Adding three measures:

SumSales = Sum(sales[Seasonally adjusted ($m)])
LastYearSales = Calculate([SumSales],DATEADD(DATESYTD(sales[Month]),-1,YEAR))
yoy = ([SumSales]-[LastYearSales])/[LastYearSales]-1

Now, it’s more apparent that in the middle of 2022, the sales jumped compared to 2021. It only compares the adjacent two years, so I updated the “LastYearSales” to “MinYearSales”(the sales of the smallest year), and update “yoy” to use this new measure.

MinYearSales = 
VAR SelectedYearsTable = ALLSELECTED(sales[Month].[Year])
VAR MinYear = MINX(SelectedYearsTable, [Year])
RETURN
CALCULATE(
    SUM(sales[Seasonally adjusted ($m)]),
    sales[Month].[Year] = MinYear
)

yoy = ([SumSales]-[MinYearSales])/[MinYearSales]-1

3. Updating the colours

I picked orange for the line and updated the column colours referring to GPT’s suggestions.

That’s it. You could play around the other colours.

Similar posts on this topic:

  1. Top 3 PowerBI Dashboard/Report Examples
  2. Beautify the PowerBI Reports — Basic Graphs
  3. Beautify the PowerBI Reports — Maps

If you liked posts like this, you might also like a Medium membership. It’s only $5 a month, but it will give you unlimited access to articles while supporting your favourite writers. If you sign up using this link, I’ll earn a small commission. Thanks!

Data Analyst
Power Bi
Data Visualization
Data Science
Data Analysis
Recommended from ReadMedium