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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
pgalvezt
Specialist
Specialist

Acumulative option

Hello!!

First - I have a formula where I bring Normal values - (its Works Fine)

If(VN= '$',
Num(Sum({<Vs={'O'},Year= {"$(=max(Year)-1)"}, Month>}
Value/Div)*Var,'$#.##0;$-#.##0'),
Num(Sum({<Vs={'O'},Year= {"$(=max(Year)-1)"}, Month>}
Value/Div)*Var,'#.##0'&' XT'))

Second -  I have the same formula but acumulative - (Its Works Fine too)

If(VN= '$',
rangesum(above( Num(sum({<Vs={'O'},Year= {'$(=max(Year)-1)'},Month>}
Value/Div)*Var,'$#.##0;$-#.##0'),0,rowno())),
rangesum(above( Num(sum({<Vs={'O'},Year= {'$(=max(Year)-1)'},Month>}
Value/Div)*Var,'#.##0'&'  XT'),0,rowno())))

In my script I have created an Inline table:

Acumulative:
LOAD * INLINE [
Type_cumulative
Normal
cumulative
];

So, I created a filter pane with Type_cumulative Normal - Cumulative.

I have created a Line chart... so What I Want is move the lines according the selection.

 

I Have tried with:

If(Type_cumulative =Normal , 

(If(VN= '$',
Num(Sum({<Vs={'O'},Year= {"$(=max(Year)-1)"}, Month>}
Value/Div)*Var,'$#.##0;$-#.##0'),
Num(Sum({<Vs={'O'},Year= {"$(=max(Year)-1)"}, Month>}
Value/Div)*Var,'#.##0'&' XT'))),

If(VN= '$',
rangesum(above( Num(sum({<Vs={'O'},Year= {'$(=max(Year)-1)'},Month>}
Value/Div)*Var,'$#.##0;$-#.##0'),0,rowno())),
rangesum(above( Num(sum({<Vs={'O'},Year= {'$(=max(Year)-1)'},Month>}
Value/Div)*Var,'#.##0'&'  XT'),0,rowno())))

But Doesn't Work.

Could You help me in this point?

Thanks!

 

 

1 Solution

Accepted Solutions
Kushal_Chawda
MVP
MVP

try with getfieldselections

Also check the single quotes

If(getfieldselections(Type_cumulative )='Normal ', 

(If(VN= '$',
Num(Sum({<Vs={'O'},Year= {"$(=max(Year)-1)"}, Month>}
Value/Div)*Var,'$#.##0;$-#.##0'),
Num(Sum({<Vs={'O'},Year= {"$(=max(Year)-1)"}, Month>}
Value/Div)*Var,'#.##0'&' XT'))),

If(VN= '$',
rangesum(above( Num(sum({<Vs={'O'},Year= {'$(=max(Year)-1)'},Month>}
Value/Div)*Var,'$#.##0;$-#.##0'),0,rowno())),
rangesum(above( Num(sum({<Vs={'O'},Year= {'$(=max(Year)-1)'},Month>}
Value/Div)*Var,'#.##0'&'  XT'),0,rowno())))

View solution in original post

1 Reply
Kushal_Chawda
MVP
MVP

try with getfieldselections

Also check the single quotes

If(getfieldselections(Type_cumulative )='Normal ', 

(If(VN= '$',
Num(Sum({<Vs={'O'},Year= {"$(=max(Year)-1)"}, Month>}
Value/Div)*Var,'$#.##0;$-#.##0'),
Num(Sum({<Vs={'O'},Year= {"$(=max(Year)-1)"}, Month>}
Value/Div)*Var,'#.##0'&' XT'))),

If(VN= '$',
rangesum(above( Num(sum({<Vs={'O'},Year= {'$(=max(Year)-1)'},Month>}
Value/Div)*Var,'$#.##0;$-#.##0'),0,rowno())),
rangesum(above( Num(sum({<Vs={'O'},Year= {'$(=max(Year)-1)'},Month>}
Value/Div)*Var,'#.##0'&'  XT'),0,rowno())))