Forum Discussion

ArchStanton's avatar
ArchStanton
Icon for Power Participant rankPower Participant
29 days ago
Solved

KPI Card Visual Formatting Help needed

Hi,

I'm trying to incorporate the methodology in this video into my own KPI Card Visual, the main difference being that the video shows a % change on last month whereas my shows the numeric value.

How to Create a KPI Card Visual in Power BI (New Card Visual 2026) - YouTube

I'm trying to achieve this: (whenever I try to paste an image using Snipping Tool I get a HTML error preventing me, its very annoying as its worked previously - so I have to use DropBox instead which is a pain)

https://www.dropbox.com/scl/fi/v3etak3i0foyahg72ixev/Screenshot-2026-08-19-125551.png?rlkey=16bxrbvs1kzr2n7qxveyg4rrm&st=9siknt4y&dl=0

So far I have this:

https://www.dropbox.com/scl/fi/t0smmefg2xanenctxijj0/Screenshot-2026-08-19-130219.png?rlkey=ijd6nre1bw4n9hzly6ojfffgj&st=lcjr3nci&dl=0

I do have a measure that calculates the numeric difference between current & previous month:

Caseload Difference from Prev Mth = [Current Total] - [Previous Total]

My vs last month measure created the arrow but doesn't show the variance on last month. I would like to show the variance with an increase in Red and Decrease in green just like the Sales image above.

Vs last month =
VAR variance_ = [Current Total] - [Previous Total] VAR format_ = FORMAT(variance_, "0.0","-0.0") // I want a minus if this is negative, I guess this will happen by default
RETURN
SWITCH( TRUE(), variance_ > 0, UNICHAR(11165), variance_ < 0, UNICHAR(11167), variance_)

I hope that when the Previous Mth variance is introduced I will be able to add this measure to introduce the Conditional Formatting:

Conditional Formatting vs last month =
VAR variance_ = [Current Total] - [Previous Total]
RETURN
SWITCH
( TRUE(), variance_ > 0, "Red", variance_ < 0, "Green", "Grey")

So my question is, how do I add the Caseload Difference (variance) into my card in order for me to then apply the formatting that I desire?

 

  • I've managed to figure this one out myself, I missed part of the DAX code earlier, specifically the

     & format_ 

    part, everything came to together after that

7 Replies

    • aswathimohan's avatar
      aswathimohan
      Icon for Advocate I rankAdvocate I

      To change position of accent bar - Cards> Accent bar> Position > Top. An apply conditional formatting to the color using the measure you have created

      Your vs lastmonth measure needs slight changes

      Vs last month = 
      VAR variance_ = [Current Total] - [Previous Total] 
      VAR format_ = FORMAT(variance_, "0.0;0.0;0.0") 
      VAR symbol_ = SWITCH( TRUE(), variance_ > 0, UNICHAR(11165), variance_ < 0, UNICHAR(11167), "")
      RETURN
      symbol_ & " " & format_

      If you want the minus sign to appear you need the format_ variable as

      VAR format_ = FORMAT(variance_, "0.0") 

      Go to reference labels>Add label and put this measure here. Once added. In the select label option select vs last month, In the Value section of Reference labels, under color, apply conditional formatting. 

      After some adjustments to "background" option under Size and Style, "Multi card layout" and "cards", and adjusting the divider, youll end up with something like this

  • ArchStanton's avatar
    ArchStanton
    Icon for Power Participant rankPower Participant
    Vs last month = 
    VAR CurrentMth = [Current Total]
    VAR PreviousMth = [Previous Total]
    VAR variance_ = [Current Total] - [Previous Total]
    VAR format_ = FORMAT(variance_, "0") // I want a minus if this is negative, I guess this will happen by default
    RETURN
       SWITCH(
        TRUE(),
            variance_ > 0, UNICHAR(11165) & format_,
            variance_ < 0, UNICHAR(11167) & format_,
            variance_)




  • ArchStanton's avatar
    ArchStanton
    Icon for Power Participant rankPower Participant

    So I now have the Vs last month parts of the Card, now to conditionally format the Number 3 and the accent bar, If I can do this I will close the ticket myself

    • aswathimohan's avatar
      aswathimohan
      Icon for Advocate I rankAdvocate I

      To conditionally format Number 3:

      Go to reference labels, Select label, select the measure.

      The inside reference label itself go to values, click on conditional formatting for color.

      Choose Format style as Field value and select you color measure

      For accent bar go to Cards>Accent Bar>Change position to Top. In the "color" settings repeat steps above

       

  • ArchStanton's avatar
    ArchStanton
    Icon for Power Participant rankPower Participant

    I've managed to figure this one out myself, I missed part of the DAX code earlier, specifically the

     & format_ 

    part, everything came to together after that