Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
pgalvezt
Specialist
Specialist

Inline With If Statement

Hello,

In my dashboard I have a Multibox from this table:

Div:

LOAD * INLINE [

    Symb,Div

    $, 1

    M$, 1000

    MM$, 1000000

];

And I Have Another Field from another table (Field A)

So I don´t know if its posible but What I want is:

IF(Field A = 'Click On that Field',

LOAD * INLINE [

    Symb,Div

    $, 1

];

,

LOAD * INLINE [

    Symb,Div

    $, 1

    M$, 1000

    MM$, 1000000

];

The Idea its block the value M$ and MM$ when user select 'Click On that Field',


Thanks!

1 Solution

Accepted Solutions
pgalvezt
Specialist
Specialist
Author

I did it with your help !!!... I came up with the following: I took a picture of the weight symbol. I associated that photo with a text object that will appear conditionally when the following happens: = GetFieldSelections (VisualizeNumber) = 'View in UF' and GetFieldSelections (Symbol) = 'M $' Or GetFieldSelections (Symbol) = 'MM $' .. After this I changed the formula to the general table for this: = If (Display Number = 'View in UF' and Symbol = 'M $' or Symbol = 'MM $',

Sum (Balance),

Sum (Balance / Divisor) * sum ({<Month = {$ (xMesMax)}, Year = {$ (xYearMax)}>} Total Distinct ValueUF))..

So when the user always clicks on UF M $ and MM $ the sign $ will appear and the calculation will always be in $. It is as if it is blocked.

View solution in original post

20 Replies
vishsaggi
Champion III
Champion III

Not completely clear, can you tell us what your FieldA values are? And what should be your expected output when you select any value in your FieldA. We can try using Mapping Load to map with your FieldA values. Cannot suggest until further information.

pgalvezt
Specialist
Specialist
Author

Hello vishsaggi

Field A contains 2 options: 'Real' and 'UF'... So when UF is clicked the divisor number must be blocked.

UF Clicked:

LOAD * INLINE [

    Symb,Div

    $, 1

];

Any option is clicked except UF.

,

LOAD * INLINE [

    Symb,Div

    $, 1

    M$, 1000

    MM$, 1000000

];

vishsaggi
Champion III
Champion III

you mean when you click on UF your Multibox should show only 1 else show 1, 100, and 1000000?

What you mean by blocked?

pgalvezt
Specialist
Specialist
Author

Thats Right... Thats exactly what I want to achieve

vishsaggi
Champion III
Champion III

In your multibox for the field Div just write this expression like

= IF(GetFieldSelections(FieldA) = 'UF', 1, Div)

pgalvezt
Specialist
Specialist
Author

Where must writte the expression inside the multibox... I didn't see expression on multibox.

vishsaggi
Champion III
Champion III

‌in the general tab of multibox properties window , in the middle you can see few buttons, the one before the edit buttons there is an expression button. There use this if condition changing the field names to your actualfieldname.

pgalvezt
Specialist
Specialist
Author

vishsaggi


Found it! the problem is when I try to select any option $ $M $MM does not allow me to do it. I need the option "always a selected value". It seems that with the expression, the option disappears and shows me the 3 values. and as I mentioned you will not let me select 1 value.

Thanks!


vishsaggi
Champion III
Champion III

Can you share this qvw app where you implemented this if Condition?