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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Kirsten
Creator II
Creator II

Negative numbers to positive

I need to convert the negative numbers to positive like this: -1356  to (1356) and the positive numbers should become empty cells with a –   See attachment for an example. (always good to make something negative positive :))

3 Replies
Taoufiq_Zarra
MVP
MVP

@Kirsten  may be

=if(Field>0,null(),-Field)
Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
Kirsten
Creator II
Creator II
Author

Hi @Taoufiq_Zarra   thanks.

My expression currently looks like this:

((1-Sum([Sum of Total Sum of Hours [ITM]]])/Sum([Count of EQ ID])/3.1)*Sum([Sum of Total Sum of Cost [ITM]]]))*-1

With the *-1   I made the negatives positive. 

How do I need to integrate your code in this?

Saravanan_Desingh
MVP
MVP

With @Taoufiq_Zarra  solution.

If(((1-Sum([Sum of Total Sum of Hours [ITM]]])/Sum([Count of EQ ID])/3.1)*Sum([Sum of Total Sum of Cost [ITM]]]))<0,
-((1-Sum([Sum of Total Sum of Hours [ITM]]])/Sum([Count of EQ ID])/3.1)*Sum([Sum of Total Sum of Cost [ITM]]]))
)