Skip to main content

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
CUSTOMERS ONLY: Now accepting customer applications for the 2023 Luminary Program: SUBMIT NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
paulyeo11
Master
Master

How to force expression display positive value ?

Hi All

GL_TABLE:
LOAD
'PMC' as SOURCE,
[Account Code] as AccountCode,
If([Account Code]>=5000000 and [Account Code]<=5999999,'P_Revenue') as [P_Revenue],
If([Account Code]>=8000000 and [Account Code]<=8999999,'P_Exp') as [P_Exp],
Date( Date#([Posting Date], 'DD.MM.YY'), 'DD/MM/YYYY') as [date],
[Deb./Cred. (LC)] AS Amount,
[Account Name] AS GL_DESC_
FROM
[C:\Users\Paul Yeo\OneDrive - ISDN Holdings Limited\RAW DATA SAP\GL_PMC_2019.xlsx]
(ooxml, embedded labels, table is [Modified GL Data]);

For Each i in 108
WhatIfDimension$(i):
LOAD * INLINE [
Pls $(i)st Dim,Column$(i)
YrMth,YearMonth
DETAIL,GL_DESC_
SOURCE,SOURCE
];
NEXT i;

For Each i in 901,902
WhatIfDimension$(i):
LOAD * INLINE [
Pls select $(i)st Dim,Column$(i)
01 Revenue,P_Revenue
02 Exp,P_Exp
];
NEXT i;

I use the below expression for list the total amount for Revenue or Exp depend on user selection :-

Money(
Sum(Aggr(SUM({<year = {"$(=Max(year)-0)"},month={"<=$(=Max({<sales = {'*'}, year = {$(=Max(year))}>}month))"},$(ColumnDim901)={$(ColumnDim901)}>}Amount*1)/$(Columndim89)/1000, $(ColumnDim108)))
,
$(vMoneyFormatK))

My Question is how to make both display positive value ?
Since i plan to display the sales amount trend chart on positive value and Expense trend chart in positive value.
As now Revenue display negative value , and Exp display positive value.

Paul Yeo

1 Solution

Accepted Solutions
syedabik
Partner - Contributor II
Partner - Contributor II

3 Replies
paulyeo11
Master
Master
Author

Hi All 

Enclosed my QVW

Paul

 

syedabik
Partner - Contributor II
Partner - Contributor II

paulyeo11
Master
Master
Author

Hi Sye

it work fine now. But i face one more issue below :-

https://community.qlik.com/t5/QlikView-Scripting/How-to-make-it-can-display-ve-or-ve-for-net-profit-...

Paul Yeo