Forum Discussion

walterdp's avatar
walterdp
Helper I
3 years ago
Solved

How to create a visual object with a dynamic information

Hi all


I need to create a card with a text that will change based on the result of the calculation of the median of the time to restore. Let me give an example

 

 

The graphic shows the median time to restore tickets. The field Time to Restore was calculated by sustracting end date to start date, add that value in the Y axis and select Median. Then I added the card with various rows and add field Time to Restore and again, change display to show Median. So far, so good.

 

Problem is that I want to add a card that, based on the previous value, can say if the Median to Restore is

 

One Day

One Week

One Month

Six Months

One Year

 

So I guess I need to create a measure that can give me the same value I got in the previous card and based on that result and comparing, display the text specific text.

Something like

 

If (median of time to resolve) <= 24 then "One Day" else

     if (median of time to resolve) <= 168 "One week" else... 

 

Problem is, I don't know how to translate that to actual code in Power BI ! 😞

 

Any help would be much appreciated!

  • Hi all:

     

    With the help of a team mate we found the solution and it was a very simple one (I feel very stupid by the way).

    Estados = IF(MEDIAN('Incs Cerrados (dic 2022)'[Tiempo Resolución])<=24, "Diario", 
    IF(MEDIAN('Incs Cerrados (dic 2022)'[Tiempo Resolución])<=168, "Semanal", 
    IF(MEDIAN('Incs Cerrados (dic 2022)'[Tiempo Resolución])<= 720, "Mensual", "Anual")))

     

2 Replies