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

Condition in dimension

Hi.

I want to aplicate a condition in a dimension. My case is:

I have a graphic with some cod of location: 4,5,6,7,8,9 and 10.   and the code i used is:   =if(Cod_Localizacion>=4 and Cod_Localizacion<=10,Desc_Localizacion)

That is perfect!!!.. Its work

location.jpg

I have a dimension, the values for default is:

  • desarrolloti
  • helpdesk
  • none
  • sysadmin

But i need to filter the dimension and show only the values that belong at cod of location.

If i used in dimension the value "expression" its work.

dimesion.jpg

BUT, when i select some values of this dimension, dont show the green color, i select the value but no show color of selection. I think is because you can not use other different variables that dimension, in my case my dimension is "Cod_AreaResponsable" and i use condition with "Cod_Localizacion"

dimenson1.jpg

Please help me!!, what should i do to work correctly???

11 Replies
Anil_Babu_Samineni

Is there any chance to share the Application which demonstrates the output?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
jose_vargas
Creator
Creator
Author

I share the app, in the letf you will see the dimensions with expression and the rigth whitout expression, only variable dimension.

Please try select different dimensions and see the error  O.o

Thnaks

jsakalis
Contributor III
Contributor III

Hi Jose,

    Please see the attached. Is this how you want it to work?

     If so, look at the properties for "Area Responsible" list.

                   =If(Cod_Localizacion,Cod_AreaResponsable)

jose_vargas
Creator
Creator
Author

It doesnt work

Look, you select "incidente" and then select "HELPDESK", and the value available to select in Responsable is "helpdesk" rigth? But if you try to select this value you cant. When you select "helpdesk" from "AreaResponsable" filter does correctly but the value is not painted with green color...

So.. im think the error is because y expression we use 2 different variables, and i think that in dimension we have to use just one. :S

select.jpg

vishsaggi
Champion III
Champion III

Did you try this?

SLA chart properties -> Dimension tab -> Check Supress when value is null

V.

jose_vargas
Creator
Creator
Author

Vishsaggi. The problem is not with the chart. The problem is with the "ListBox", the values exist is not null, but not painted with green color because i use a expression in the field.

vishsaggi
Champion III
Champion III

Quite did not get you what exactly your issue is but when you select any value from a dimension it turns green and the possible values will be in White background and excluded values will be grey. So, what is that, is not turning green in your case?

vishsaggi
Champion III
Champion III

Which List box ? Area Responsable with Expression or Area Responsable ?

jose_vargas
Creator
Creator
Author

In the attach .qvw that i sent first, I have:

  • AreaResponsable with Expression. Here i dont use a variable i used a expression:  =if(Cod_Localizacion>=4 and Cod_Localizacion<=10,Cod_AreaResponsable)
  • AreaResponsable. Here i use a variable Cod_AreaResponsable

the prolem with no paint the color green when have a values is with all the listbox that uses expression, when use a variable all works fine.

But if i use a expression with the same variable, all works fine, but if i used a different variable in expression is doesnt work, in my cas i use 2 variables   Cod_Localizacion and Cod_AreaResponsable.... So i dont know how to set for this to works well