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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
deepakqlikview_123
Specialist
Specialist

Formula

Hi All,

I have used rangesum function previously as per below

=RangeSum(Alt(Before([Total Analysis]), 0), count(CHASSIS_NUMBER))

It was working fine.

But now I have calculated percentage by using below formula.

=Num((( sum ({<DeptFlag={'FAB'},Flag = {'3-4 Wheeler'}>}MAN_ON_ROLE)

        -

        sum ({<DeptFlag={'FAB'},Flag = {'3-4 Wheeler'}>}PRESENT))

        /

        sum ({<DeptFlag={'FAB'},Flag = {'3-4 Wheeler'}>}MAN_ON_ROLE)),'#,#0%' )


Can you please suggest hoe to use rangesum function in above formula.




Thanks

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

NUM((RangeSum(Above(sum ({<SHORT_NAME={'FAB'},Flag = {'3-4 Wheeler'}>}MAN_ON_ROLE),0,RowNo()))

-

RangeSum(Above(sum ({<SHORT_NAME={'FAB'},Flag = {'3-4 Wheeler'}>}PRESENT),0,RowNo())))

/

RangeSum(Above(sum ({<SHORT_NAME={'FAB'},Flag = {'3-4 Wheeler'}>}MAN_ON_ROLE),0,RowNo())),'#,#0%)

or

NUM((RangeSum(Before(sum ({<SHORT_NAME={'FAB'},Flag = {'3-4 Wheeler'}>}MAN_ON_ROLE),0,RowNo()))

-

RangeSum(Before(sum ({<SHORT_NAME={'FAB'},Flag = {'3-4 Wheeler'}>}PRESENT),0,RowNo())))

/

RangeSum(Before(sum ({<SHORT_NAME={'FAB'},Flag = {'3-4 Wheeler'}>}MAN_ON_ROLE),0,RowNo())),'#,#0%')

View solution in original post

12 Replies
MK_QSL
MVP
MVP

Not getting your question properly. Could you please elaborate little more !

deepakqlikview_123
Specialist
Specialist
Author

Hi Manish,

As per requirement I want to apply rangsum function for percentage whatever calculated in below mentioned formula

=Num((( sum ({<DeptFlag={'FAB'},Flag = {'3-4 Wheeler'}>}MAN_ON_ROLE)

        -

        sum ({<DeptFlag={'FAB'},Flag = {'3-4 Wheeler'}>}PRESENT))

        /

        sum ({<DeptFlag={'FAB'},Flag = {'3-4 Wheeler'}>}MAN_ON_ROLE)),'#,#0%' )



Thanks

MK_QSL
MVP
MVP

Not sure below will work on not... but nothing wrong in trying...


=NUM((RangeSum(Before(sum({<DeptFlag={'FAB'},Flag = {'3-4 Wheeler'}>} MAN_ON_ROLE),0,RowNo()))

-

RangeSum(Before(sum({<DeptFlag={'FAB'},Flag = {'3-4 Wheeler'}>} PRESENT),0,RowNo())))

/

RangeSum(Before(sum({<DeptFlag={'FAB'},Flag = {'3-4 Wheeler'}>} MAN_ON_ROLE),0,RowNo())),

'#,#0%' )

deepakqlikview_123
Specialist
Specialist
Author

Hi Manish,

It is not showing excepted results.

Thanks.

MK_QSL
MVP
MVP

If possible, please provide sample data in excel file along with your requirements.

only 5-10 like would be ok to work.

deepakqlikview_123
Specialist
Specialist
Author

Hi Manish,

Please find attached QVW file contains sample data.

Please suggest how to use Rangesum function in above formula.

Thanks,

MK_QSL
MVP
MVP

There is no DeptFlag in your data model.

use below

=num(

  (sum ({<SHORT_NAME={'FAB'},Flag = {'3-4 Wheeler'}>}MAN_ON_ROLE)

  -

  sum ({<SHORT_NAME={'FAB'},Flag = {'3-4 Wheeler'}>}PRESENT))

/

sum ({<SHORT_NAME={'FAB'},Flag = {'3-4 Wheeler'}>}MAN_ON_ROLE),'#,#0%' )

deepakqlikview_123
Specialist
Specialist
Author

HI manish,

How to use rangesum function in above formula.

Thanks

MK_QSL
MVP
MVP

NUM(

          (

               RangeSum(YourFirstExpression)

               -

               RangeSum(YourSecondExpression)

          )

               /RangeSum(YourFirstExpression),

'#,##0.00%')