The May 2020 Power BI update (which was released today, May 19th, 2020) has a new feature that allows you to set a shadow around your visuals. I had a little bit of fun testing out this feature; I used it to to illuminate KPI cards with conditional formatting to tell a more interesting story.
To illustrate this new feature, I just created a simple Sales vs Sales Target KPI card, as you can see above.
I created a what-if parameter to set the Sales Target value and then calculated % Sales against this Target value. I then created another simple measure to set the shadow colour based on % Sales Target achieved. I used conditional formatting to change the shadow according to the following parameters:
- If the % Sales vs Target is more than 90%, then Green,
- If the % Sales vs Target is more than 70% but less than 90%, then Yellow,
- otherwise Red.
Add following measures (I called it Shadow Color) for conditional formatting and this measure we will use to illuminate KPI card
Sales Status = VAR __targetAchieved = [% Target Achieved] --simple measure to calculate % of target achieved dividing sales by target RETURN SWITCH ( TRUE(), __targetAchieved > .9, 1, --above 90% __targetAchieved > .7, 2, -- above 70% 3 )
Shadow Color = VAR __salesStatus = [Sales Status] RETURN SWITCH ( __salesStatus, 1, "#7FC600", 2, "#F9C700", "#C6001C" )
Let’s add above measure to set the shadow for the KPI Card. Follow steps in next image for conditional formatting:
- Click fx button to set conditional formatting
- Select Field Value in Format by drop down
- Under Based on field choose the measure name, in this case it is called Shadow Color
Finally, make tweak to shadow settings by selecting Custom value in Preset section so that shadow show up around KPI card
And that’s it! You can highlight visuals using this new shadow feature, along with conditional formatting, to create stunning reports. For an example of what the finished product looks like, please see the image at the beginning of this post.
I hope you find this new feature useful and are able to use it to tell a data story within your organization.
About the Author
Parv Chana is a BI Architect and Consultant with over 20 years of industry experience. He runs a small consulting company, PeryTUS IT Solutions, where he implements Power BI solutions for his clients, which range from small to large enterprises. He has experience working within a wide variety of industries and has deployed many unique solutions to solve his clients’ BI needs. He is a Microsoft Data Platform MVP and has been working with Power BI ever since it was made available in 2015.
His areas of focus include implementing end to end Power BI solutions (from data modelling to visualization), analyzing existing Power BI solutions, helping organizations follow best practices for scalable BI models, and providing training to help his clients achieve their BI goals.