We live in a fast-paced environment. Stakeholders are pressed for time and have little patience. It could be difficult for them to move from one report to the next. As a result, the importance of having all aesthetically appealing reports on a single reporting dashboard cannot be overstated.
We explored some DAX functions in this Data Digest episode to address the challenge of tracking multiple KPIs from within a single dashboard. This technique keeps your dashboard simple - there's no need for multiple reports for different KPIs, and easily makes it more appealing and sticky to your stakeholders.
Instructor: David Obeh Alobo (LinkedIn)
If you prefer to follow along with a written tutorial, we've also got you covered.
We'll assume you already know your way around Power Query, DAX, Data Modelling, and Power BI in general.
Some of the DAX functions employed include:
At the end of this short tutorial, you should be able to create the following:
Resources: 📁 Download dataset.
We have imported the data and created the data model as shown below:
From the model tab, create a new table, My_Measures:
My_Measures =
{BLANK()}
This table would serve as a folder or container to house all measures for proper housekeeping.
In this table, create the following measures:
Profit = SUM(Orders[Profit])
Quantity Ordered = SUM(Orders[Quantity])
Sales = SUM(Orders[Sales])
Cost = [Profit] + [Sales]
Create a measure, Background:
Background = SWITCH(
SELECTEDVALUE('Location'[Region]),
"East", "white",
"West", "light gray",
"South", "silver",
"Pink"
)
Header =
IF (
ISBLANK ( SELECTEDVALUE ( 'Date'[Year] ) ),
" ",
SELECTEDVALUE ( 'Date'[Year] )
) & " "
& SELECTEDVALUE ( 'Measure Table'[Measure] ) & " Breakdown for "
& IF (
ISBLANK ( SELECTEDVALUE ( Location[Region] ) ),
"All Regions",
SELECTEDVALUE ( Location[Region] )
)
Dynamic Measure =
VAR Selection =
SELECTEDVALUE ( 'Measure Table'[Measure], "Sales" )
RETURN
SWITCH (
TRUE (),
Selection = "Sales", [Sales],
Selection = "Cost", [Cost],
Selection = "Profit", [Profit],
Selection = "Quantity Ordered", [Quantity Ordered],
"Sales"
)
Creating the Visuals
Inner-Background =
SWITCH (
SELECTEDVALUE ( 'Location'[Region] ),
"East", "white",
"West", "light gray",
"South", "silver",
"Pink"
)
Create a measure, Dynamic Measure
Dynamic Measure =
VAR Selection =
SELECTEDVALUE ( 'Measure Table'[Measure], "Sales" )
RETURN
SWITCH (
TRUE (),
Selection = "Sales", [Sales],
Selection = "Cost", [Cost],
Selection = "Profit", [Profit],
Selection = "Quantity Ordered", [Quantity Ordered],
"Sales"
)
Disconnected Tables are those tables in our models where we don’t have any relationship with them. In other words, any model table that is not related to any other model table. Basically, it is used to accept “user input”, allowing model calculations to use the input value in a meaningful way. It is not intended to propagate filters to other model tables.
KPI Title =
SELECTEDVALUE ( Location[Region] ) & " Total "
& IF (
ISBLANK ( SELECTEDVALUE ( 'Measure Table'[Measure] ) ),
" All Region ",
SELECTEDVALUE ( 'Measure Table'[Measure] )
) & " "
& IF (
ISBLANK ( SELECTEDVALUE ( 'Date'[Year] ) ),
" All Year ",
SELECTEDVALUE ( 'Date'[Year] )
)
We do hope that you found this episode of the Data digest series exciting and insightful, for more access to such quality content, kindly sign up to the Resa platform by clicking here.
Thank you for learning with Us!
Empowering individuals and businesses with the tools to harness data, drive innovation, and achieve excellence in a digital world.
Copyright 2025Resagratia. All Rights Reserved.