Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
vinserra
Frequent Visitor

OKViz card with states variance using time

Hello.  I am trying to use the visual card with states by OKViz for a call center agent dashboard I am building for my company.  I want to be able to use the card to display an agent's average time on the phone and have the variance of the visualization display the difference to the target goal.  I have my data in type date/time and used the dax time() function to convert the data so that both my actual time and target time are showing correctly and can still be used in computations since they are not in text format.  Here is what the card currently looks like.  The variance is set to show absolute value.  As can be seen, it is showing the variance as HH:mm:ss rather than 00:02:23.  I'm not sure if card with states is not capable of doing variances with time or if I have something wrong.  Any help is greatly appreciated.  Thank you.

 

Capture.JPG

2 REPLIES 2
v-yuta-msft
Community Support
Community Support

Hi vinserra,

 

"The variance is set to show absolute value.  As can be seen, it is showing the variance as HH:mm:ss rather than 00:02:23."

<--- Could you share the dax formula you are using and clarify more details?

 

Regards,

Jimmy Tao

Hi Jimmy.  Thanks for following up to this.   I am using the following DAX formula.  

 

Talk Time = time(0,0,CALCULATE((SUM(agentconnectiondetail[talktime])),agentconnectiondetail[talktime]>0)/[CH]) This formula along with using the date/time formatting of 13:30:55 (HH:mm:ss) results in the 00:08:00 seen in the image.
[CH] is a separate measure that calculates the number of calls to divide into the talktime. talktime is recorded in seconds.

 

The Goal is a decimal number representing seconds in a day.  It is found in a table with the column formatted as Data type: Time and the Format: 13:30:55 (HH:mm:ss)

 

When I do a simple measure of (Talk Time – Goal) I get the correct difference but the card with states does not show a difference it shows what is seen in the image.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.