This webinar focused on how to improve your Power BI visuals with titles that change as you slice your data and visual formatting based on your company’s KPIs and priorities. We enjoyed sharing this fun topic utilizing the great visual options in Power BI. Please see our resource links and code used below.
Here are some of the helpful links that we mentioned:
-
DAX FORMAT function (see links at bottom for numeric formats)
-
Guy in a Cube video on Concatenated List of Values (advanced dynamic title)
Conditional Formatting Code Used
Title Trending Salesperson =
var salesPerson = SELECTEDVALUE(Salespersons[Name])
var selYear = SELECTEDVALUE('Calendar'[Year], "All Years")
RETURN
IF(ISBLANK(salesPerson),"Trending Sales " & selYear, "Trending Sales: " & salesPerson & " " & selYear)"
Title Past 2 Months Sales =
var mindate = CALCULATE( MIN('Calendar'[Date]), ALL('Calendar'),'Calendar'[Past2Months] = 1)
RETURN "Sales Since " & mindate
Title Sales to Goal =
"Sales Goal " & FORMAT([Sales to Goal],"Percent")
Title Sales Goal Alert =
var selMonth = SELECTEDVALUE('Calendar'[Month])
RETURN
SWITCH(TRUE(),
ISBLANK(selMonth),",
[Sales to Goal] < .93, "Sales below minimum",
"Sales Goal %")
Show Sales Goal Alert =
IF([Sales to Goal] < .93, 1, 0)
Show Sales Goal Alert Number =
var selMonth = SELECTEDVALUE('Calendar'[Month])
RETURN
IF(ISBLANK(selMonth),", FORMAT([Sales to Goal],"Percent"))