Sales Scorecard: Where are we losing money? by Decisive Data
12-20-2016 12:52 PM - last edited 05-30-2017 09:20 AM
12-20-2016 12:52 PM - edited 05-30-2017 09:20 AM
"How is my company doing?"
It's a question we hear often. It seems simple enough, but answering it is a complex process. This report is designed to answer the question in a clear and straightforward manner, while providing enough detail to take some action.
If we wanted to further develop this story, we would build on the outcomes of our Sales Scorecard by adding additional reports with more granular data. Each of these report tabs would answer one specific question that arises from use of our Sales Scorecard.
A report is most valuable when it's actionable. We started by identifying which components of the process we can influence:
- What we're selling (products)
- Where we're selling (region, state)
- When we're selling (month, year)
- Who is doing the selling (salesperson)
We then determined the report's focus: areas that are not performing well. We used color to highlight these problem areas, and leveraged a matrix with conditional formatting to give us granular insights that could prompt strategy changes. Finally, we included comparisons of profit and sales against prior years to put the performance into perspective. We leveraged basic Power BI elements (cards, shapes, tree maps, and DAX) to develop a KPI section in the top right of these charts to provide additional context.
From this report it's clear that we should evaluate our training programs. We may want to pick up the phone and follow up with William, who seems to be struggling in several areas, most notably in OSHA supplies which is a profitable area for all other sales staff.
We might also want to look further into the strange profit behavior in Mar 2013, where we saw a large dip compared to the prior year.
A report like this is the first step into answering the question "How is my company doing?"
Pushing the Boundaries
Every so often you have a clear vision of how to communicate something, but you aren't quite able to realize that vision with the default tools or options. Custom visuals is one method to help realize your vision, but I'm not a D3 expert and I like a challenge, so sometimes I'll attempt to repurpose default tools in non-standard ways to achieve the same effect.
I had a vision for what I wanted my KPI visualization to look like:
The main elements are:
- % Growth Year over Year (main value)
- Current Year value (adds context)
- Prior Year value (adds context)
- Indicator (quick recognition of good/bad state)
I started with a card for my main value, the % Growth Year over Year. I then created 2 dax measures to format my Current Year and Prior Year values nicely for display (using FORMAT to add "CY: " or "PY: " in front of the value for context). I put each of those into separate cards and arranged them next to my % Growth card.
Finally, I created the indicators. I made a triangle shape, colored it grey, and oriented it upwards. I made a second triangle shape, colored it red, and oriented it downwards, and aligned it directly under the upward triangle. I then created 2 dax measures called KPI Red and KPI Grey.
KPI Red = 1 when % Growth is Positive and 0 when % Growth is Negative.
KPI Grey = 0 when % Growth is Positive and 1 when % Growth is Negative.
I then put each of those into individual tree maps, changed the data colors to match the background, and arranged the tree maps over the tops of the triangles. Now when % Growth is negative, KPI Red is 0 and the tree map disappears and shows the red triangle underneath, while KPI Greyis 1 and the tree map covers the grey arrow.
Wrapping it up
The method above worked pretty well and got me what I wanted. However there are a few oddities - light white lines that outline the tree maps, the arrows are in different locations if they are up or down (because they're 2 different triangles), and the CY and PY are centered rather than left aligned since they're in cards.
Ultimately, this got us where we needed to go for now. However, as a next step I would begin investigating how to turn this into a custom visual to make future use much simpler. For now, it's great to know that we can leverage basic Power BI elements like triangles to create custom KPIs. It just takes a bit of thinking outside the box, plus some creative use of DAX and willingness to use standard visuals (tree maps) in non-standard ways (covers to hide something).
4/12 Update: Simplify using UNICHAR
I just discovered the UNICHAR function in DAX, and used this to simplify my process! Currently we have 2 elements for each indicator, for a total of 8 elements. This method cuts the elements in half!
- Delete the tree maps and the arrow objects
- Delete the KPI Red/Green measures for Sales and Profit (4 total)
- Create 4 new measures
- Sales Indicator Positive = IF(AND(HASONEVALUE('Date'[Fiscal Year]),'Sales Scorecard'[Sales YoY Growth]>0),UNICHAR(11205),"")
- Sales Indicator Negative = IF(AND(HASONEVALUE('Date'[Fiscal Year]),'Sales Scorecard'[Sales YoY Growth]<0),UNICHAR(11206),"")
- Profit Indicator Negative = IF(AND(HASONEVALUE('Date'[Fiscal Year]),'Sales Scorecard'[Profit YoY Growth]<0),UNICHAR(11205),"")
- Profit Indicator Positive = IF(AND(HASONEVALUE('Date'[Fiscal Year]),'Sales Scorecard'[Profit YoY Growth]>0),UNICHAR(11206),"")
- Put each measure in a separate card.
- Change the Data Label colors to make the down arrows red and the up arrows grey
- Arrange your arrows and you're done!
With this method, we are using the UNICHAR to display UNICODE arrow characters. Since we're doing this in DAX, we can us IF statements to hide/show the arrows based on our measures, which means we no longer need to use the tree maps as covers, cutting our number of elements in half! Less elements = easier to maintain.
Jared Knutzen | Visualization Consultant
Decisive Data | www.decisivedata.net
01-09-2017 02:33 PM
One question: How do you create the transparant objects? there are no borders no titles etc.??
when i create an object and i hover my mouse on the object there is allways these boxes and lines etc.
Hope you can help me.
01-10-2017 04:04 AM
Hi Jared. Very cool Scorecard! Would you be able to share the pbix or simply descirbe how you made the profitable/unprofitable as a legend?
Would be much appreciated!
01-10-2017 10:14 AM
Hi Jochem, great question! The first step was to turn off borders, titles, labels, axis, legend, and background in the formatting options for the visual. Once that's done, I still have the object container that shows when I hover over it.
In Power BI Desktop (and Power BI Service), when I hover over the object I see the container for the object. As far as I know, there is no way around this. Here is what it looks like in PBI Desktop when I hover over the cover for my grey triangle:
However, when you embed the report the containers disappear and you no longer see them when you hover over the object. Here is what the same content looks like in a report that has been embedded to the web:
I still get the "expand" option, but I no longer see the container.
Hope that helps! If I didn't answer your question, feel free to reply back in the comments! If you post your .pbix file, I'm happy to take a look as well
01-10-2017 10:29 AM - edited 01-10-2017 10:30 AM
Hi @chrisbilsoe, great question! I tried a few different methods.
- I used 2 circle shapes that I created in Power BI, and colored them the way I wanted. Then I created 2 text boxes, and arranged these to form my legend. Unfortunately, there is a limit to how small you can make an object in Power BI, and I couldn't make the circles small enough, so I had to scrap this method.
- I made a bar chart that had my profit categories on legend, and set the colors the way I wanted them. I then resized the bar chart so that only the legend was showing, and put that legend in my header. Unfortunately, I was stuck with the left-to-right layout of the legend, which I didn't like in my header...I wanted the categories stacked vertically. So I had to scrap this method as well.
- I used Photoshop. I created 2 circles and saved that as a PNG file. I imported it into my Power BI report, created a text box with my 2 text values, and then aligned them. You could do this in GIMP or another free software as well (even Paint would probably work). The reason I did the text within Power BI is because it scales on different size monitors, whereas doing the text in Photoshop would result in text as an image, which does not scale well.
Hope that helps! I've attached the PNG file of the legend indicators (my fancy word for the circles) for reference. Feel free to respond in the comments if you have additional questions
01-13-2017 01:10 PM
Awesome viz! I love it.
A few quick questions:
- how to you avoid not getting an error when no year is selected?
- When no year is selected, is your trend line basically a sum of all years?
01-14-2017 01:45 AM
Amazing work! this is how a proffessional power bi dashboard should look like. Its useful, several smart features, and doesnt scream "out of the box" default dashboard.
This dashboard will inspire me for sure
01-14-2017 10:25 AM
That's a great dashboard!
So you use the report as a dashboard, am I correct?
In a Dashboard - you cannot put one object on top of another as you did with your kpi.
01-16-2017 08:24 AM
Hi @taraskaduk, thank you! The line charts are plotting my measure (Sales or Profit) against the Fiscal Month Abbreviation (Jan, Feb, Mar, etc.) so there is no year component to my axis. Fiscal Month Abbreviation is a text field, not a date field. When no year is selected, "Jan" will show the sums in January across all years. I did this for a couple reasons:
- In this dashboard, I only ever wanted to show 1 year's trend at a time.
- Showing just the month abbreviation was much clearer and cleaner than showing a date.
My goal was to have the "Year" slicer be a single select, so that you can never select more than one year. Unfortunately, that isn't possible with the current slicers. If no year is selected, the display text in the top right changes to say "Select a year". I could also make the line chart change to say "Select a year", but opted not to in this version.
Hope that helps!