Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
chaitanyajami
Partner - Creator
Partner - Creator

LOWER or HIGHER THAN DISTRICT AVERAGE

Hi all,

i have a requirement to show percentage of calls in quarter that is lower or higher than district average. iam using the below calculation but its not working, please suggest is there anything wrong im doing below.

num(fabs(((Sum({<MetricId={'3'},QuarterEndDate={'$(=vMaxQuarter)'}>}CALLS_CURRENT_SELL_PERIOD)/
Count(distinct{<MetricId={'3'},QuarterEndDate={'$(=vMaxQuarter)'}>}[%DATE]))
-
(Sum(TOTAL<DISTRICT>{<MetricId={'3'},QuarterEndDate={'$(=vMaxQuarter)'},DISTRICT=p(DISTRICT),TERRITORY_NUMBER=>}CALLS_CURRENT_SELL_PERIOD)/
Count(distinct TOTAL<DISTRICT>{<MetricId={'3'},QuarterEndDate={'$(=vMaxQuarter)'},DISTRICT=p(DISTRICT),TERRITORY_NUMBER=>}[%DATE])))
/
(Sum(TOTAL<DISTRICT>{<MetricId={'3'},QuarterEndDate={'$(=vMaxQuarter)'},DISTRICT=p(DISTRICT),TERRITORY_NUMBER=>}CALLS_CURRENT_SELL_PERIOD)/
Count(distinct TOTAL<DISTRICT>{<MetricId={'3'},QuarterEndDate={'$(=vMaxQuarter)'},DISTRICT=p(DISTRICT),TERRITORY_NUMBER=>}[%DATE]))),'#,##0%')

 

from the above result if that is greater then 0 im saying Higher else lower than district average, kindly suggest if anything is wrong from the above.

Labels (2)
0 Replies