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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.