Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Support Cases coming to Qlik Community Oct. 4! Start chats, open cases, explore resources: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
prachi91
Creator III
Creator III

Column heading

hello eveyone,

it is possible ,when i select Negative(Red color) Value that time column name change to Loss and when i select Positive (Green color)Value then it change to profit.

Thank You.

13 Replies
Anil_Babu_Samineni

I never tried this before, Even don't have s/w to test. For a while my thought come up as

Below expression should be add for Label of expression with equal sign

=If(Measure < 0, 'Loss', If(Measure >0, 'Profit'))

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
tresesco
MVP
MVP

In qlik, you can't select a figure/expression; you select a field value. If you click on a calculated number and see it is selected, you have actually selected a dimension value. By handling that selection you could probably write a conditional expression for dynamic label. Try to share your sample app to work upon for specific help in details.

satheshreddy
Creator III
Creator III

Hi Prachi,

it will work you have to write condition in exp lable box.

=If(Measure < 0, 'Loss', If(Measure >0, 'Profit')).

Regards

Sathish

Anil_Babu_Samineni

Have you tested? If so, Okay

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
satheshreddy
Creator III
Creator III

Hi Anil,

I had applied my application this long back.

Regards

Sathish

jyothish8807
Master II
Master II

Hi Prachi,

Pfa sample.

Hope it helps.

Br,

KC

Best Regards,
KC
prachi91
Creator III
Creator III
Author

yes i have ,its working but not properly.in some cases its shows profit or loss otherwise it shows -

prachi91
Creator III
Creator III
Author

i don't have license key, could you please share a screen shot.

jyothish8807
Master II
Master II

Hi,

Script:

LOAD * INLINE [

    Product, CP, SP

    A, 100, 150

    B, 100, 90

];

Then Create a straight chart.

Dimension: Product

Expression: CP-SP

Expression label: = if((CP-SP)<0,'Loss',if((CP-SP)>0,'Profit','Loss/Profit'))

You can replace "CP-SP" with your expression.

Br,

KC

Best Regards,
KC