Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Customer & Partners, DEC. 9, 11 AM ET: Qlik Product & Strategy Roadmap Session: Data Analytics REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
nithin_miryala
Creator
Creator

Aggr not working

Hi Eveyone,

I have 3 Expressions in my Chart (Nation%, Division% and Practice%),

Both Nation% and Practice% are working as intended but not the Division%

When i select a ProviderNBR the  Division line should be the % in the selected providerNBR's Division.

But now it is as similar to Practice% and overlapping on the Practice%

Expression for  Division:

= aggr(sum({< EMVisitTypeDSC={'NPV'}>}EMVisitCNT),CPT, DivisionNM)/

aggr(sum({<EMVisitTypeDSC={'NPV'}>}TOTAL EMVisitCNT), CPT , DivisionNM)

Capture.JPG

Please look at the attached test Application.

Thanks

1 Solution

Accepted Solutions
sunny_talwar

May be try this

= aggr(sum({<MeasureNM={'E&M Visits'}, EMVisitTypeDSC={'NPV'}, ProviderNBR=, DivisionNM = p(DivisionNM)>}EMVisitCNT),CPT, DivisionNM)/

aggr(sum({<MeasureNM={'E&M Visits'}, EMVisitTypeDSC={'NPV'}, ProviderNBR=, DivisionNM = p(DivisionNM)>}TOTAL EMVisitCNT), CPT , DivisionNM)

Just an observation... you seem to have unnecessarily made your expressions/dimension complicated using Aggr... I am not entirely sure what you goal is to use Aggr(), but whatever you might be trying to do can be replicated using simpler expression and dimension...

View solution in original post

7 Replies
vishsaggi
Champion III
Champion III

There is no attachment can you please re upload your file.

vishsaggi
Champion III
Champion III

Not sure if this works but just try below:

= Sum(aggr(sum({< EMVisitTypeDSC = {'NPV'} >} EMVisitCNT),CPT, DivisionNM))
    /
    sum(TOTAL <CPT, DivisionNM> {< EMVisitTypeDSC={'NPV'} >} EMVisitCNT)

nithin_miryala
Creator
Creator
Author

Nope this doesn't work.

I have attached the app to main question

vishsaggi
Champion III
Champion III

Check attached?

nithin_miryala
Creator
Creator
Author

That is a good one but  since we have only one Division in my sample it worked fine.

But if we have more than one division and when we omit the Provider selection how will the expression know to filter to the particular division.

I have loaded one more division into it you will understand what am saying.

Select provider number 2 and see the Division% graph it will combined of both Urology and allergy.

then select Urology you will see difference in the line Division%

vishsaggi
Champion III
Champion III

Sorry Nithin, i left by the time you sent this response. Will look into it and get back.

sunny_talwar

May be try this

= aggr(sum({<MeasureNM={'E&M Visits'}, EMVisitTypeDSC={'NPV'}, ProviderNBR=, DivisionNM = p(DivisionNM)>}EMVisitCNT),CPT, DivisionNM)/

aggr(sum({<MeasureNM={'E&M Visits'}, EMVisitTypeDSC={'NPV'}, ProviderNBR=, DivisionNM = p(DivisionNM)>}TOTAL EMVisitCNT), CPT , DivisionNM)

Just an observation... you seem to have unnecessarily made your expressions/dimension complicated using Aggr... I am not entirely sure what you goal is to use Aggr(), but whatever you might be trying to do can be replicated using simpler expression and dimension...

View solution in original post