Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Paula1
Creator
Creator

Pass negative value if status is -1 when loading

As I do when loading, it passes the value with Status equal to -1, for a negative amount, like the example below.
cod id Status Qtde
      890
2360 23790 -1 12
2360 22930 -1 108
2360 23882 0 12
2360 109013 0 26
2360 22933 0 108
2360 22936 0 144
2360 332695 0 480
Solution
cod id Status Qtde
      890
2360 23790 -1 -12
2360 22930 -1 -108
2360 23882 0 12
2360 109013 0 26
2360 22933 0 108
2360 22936 0 144
2360 332695 0 480
Paula Santos
vitória - ES
Labels (3)
1 Solution

Accepted Solutions
Chanty4u
MVP
MVP

May be this 

YourTable_Transformed:

LOAD

    cod,

    id,

    Status,

    If(Status = -1, -Qtde, Qtde) AS Qtde

RESIDENT Your

Table;

 

Or you can create a calculated dimension 

=if(Status = -1, '(-)' & Dimension, Dimension)

 

View solution in original post

2 Replies
Chanty4u
MVP
MVP

May be this 

YourTable_Transformed:

LOAD

    cod,

    id,

    Status,

    If(Status = -1, -Qtde, Qtde) AS Qtde

RESIDENT Your

Table;

 

Or you can create a calculated dimension 

=if(Status = -1, '(-)' & Dimension, Dimension)

 

Paula1
Creator
Creator
Author

🤗

Thank you so much, it was perfect

 

2.png

Paula Santos
vitória - ES