One image
The whole card is an SVG built by Qlik script variables, shown as a Button background image. No extension, no custom front-end code.
Animated KPI Cards in Qlik
Recreating Power BI's new KPI cards in Qlik Sense — and making them animate.
Power BI's November 2026 update added native KPI cards with trend charts. A good idea in one tool is usually a good idea in the other — so I rebuilt it in Qlik Sense, then went one step further: the card animates. No extension, no custom front-end code — just one SVG written by Qlik script variables and shown as a Button's background image.
Video
Watch the Revenue card on a Qlik Sense sheet, alongside Country and Month selections.
Screen recording only — not a live Qlik connection.
The whole card is an SVG built by Qlik script variables, shown as a Button background image. No extension, no custom front-end code.
The button stores the state (open/closed) and the press time in one number, so the card only animates right after a press.
Colours, sizes and measures live in variables — change once, every card follows.
Four script tabs take you from variables to a static KPI, to monthly bars, to the full animated switch.
Define the palette, card dimensions, and reusable measure expressions once in the load script. Every card step references these variables, so changing a colour or format updates every card automatically.
| ///$tab Setup |
| /* |
| REVENUE CARD - step-by-step guide |
| The card is an SVG image built from variables and shown as the |
| background image of a Button. Follow the tabs in order: |
| Setup colours, sizes, measures (used by all steps) |
| Step 1 static card: Revenue KPI + "vs last month" |
| Step 2 static card: KPI on the left, monthly bars + "vs Target" |
Start with a clean, static SVG card that centres the headline Revenue figure and shows the month-over-month delta below it. Because it is a plain data URI, you can verify layout and number formatting before adding bars or motion.
Static preview — collapsed card
| ///$tab Step 1 - KPI |
| /* |
| STEP 1 - static card: Revenue KPI + "vs last month" |
| Result: vCard_Step1 |
| Sheet: Button > Styling > Background image > URL as expression (fx), |
| e.g. =$(vCard_Step1). Size: fit. Label: empty. |
| */ |
On the sheet
Button > Styling > Background image > URL as expression (fx): =$(vCard_Step1); size fit; empty label.
Next, build the expanded layout: shrink the KPI into the left half, add the vs Target indicator underneath, and draw the 11 monthly bars with a light baseline and month initials on the right.
Static preview — expanded card
| ///$tab Step 2 - Bars |
| /* |
| STEP 2 - static card: KPI on the left, monthly bars + "vs Target" |
| Result: vCard_Step2 |
| Sheet: change the button's background image URL to =$(vCard_Step2) |
| */ |
| // "vs Target": green at or above 100%, red below |
On the sheet
Button > Styling > Background image > URL as expression (fx): =$(vCard_Step2); size fit; empty label.
Combine both states with SVG animations driven by a single variable, vRevPress. Its parity stores open/closed and its timestamp tells the card whether the button was just pressed, so filter selections update instantly without replaying the animation.
Interactive preview — click the switch
Try a filter: the card updates, it doesn't replay the animation.
| ///$tab Step 3 - Animation |
| /* |
| STEP 3 - animated card: Step 1 layout <-> Step 2 layout |
| Result: vCard_Revenue |
| Sheet: the same Button |
| Background image URL (fx): =$(vCard_Revenue) |
| Action: Set variable value |
On the sheet
Button > Styling > Background image > URL as expression (fx): =$(vCard_Revenue); size fit; empty label.
Button action: Set variable value · Variable vRevPress · Value =Floor(Now()*86400)*2 + If(Mod(vRevPress,2)=1,0,1)
When a SET value is one quoted string, Qlik strips the outer quotes. Wrap text pieces in parentheses ( ) so the quotes survive.
Send me a message on LinkedIn with your suggestion, or grab the complete Qlik load script below and try it in your own app.