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

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'))

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
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

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
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
Anonymous
Not applicable
Author

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

Anonymous
Not applicable
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