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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.