Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
farheenayesha
Creator
Creator

Need help in correcting Utilization % formula

Hi,

I am trying to calculate Utilization % using below formula. With the below formula ill get correct values if I select a brand. If i dont select any brand then the denominator is getting added up for both the brands.

Formula: Count(distinct Gov)/count(distinct total Rst)

Ex: If i select Brand 1 then i get the correct result as below

   

    

BrandSheetGovRSTUtilization
Brand1Sheet113113398.5%
Sheet213113398.5%
Sheet312813396.2%
Sheet412513394.0%
Sheet512213391.7%
Sheet610413378.2%
Sheet713013397.7%
Blank9913374.4%
Sheet87513356.4%
Sheet98013360.2%
Sheet124113330.8%
Sheet111713312.8%

However if I select both the brands (Brand1 and Brand2) then i get the below result which is incorrect. In the below result denominator is getting added up. Hence getting Rst as 183(133+50).

But in the result i want Rst for Brand1 as 133 and for Brand 2 as 50. Kindly help.

     

BrandSheetGovRstUtilization_1
Brand1Sheet113118371.6%
Sheet213118371.6%
Sheet312818369.9%
Sheet412518368.3%
Sheet512218366.7%
Sheet610418356.8%
Sheet713018371.0%
Blank9918354.1%
Sheet87518341.0%
Sheet98018343.7%
Sheet124118322.4%
Sheet11171839.3%
Brand2Sheet15018327.3%
Sheet25018327.3%
Sheet24918326.8%
Sheet44918326.8%
Sheet54918326.8%
Sheet64818326.2%
Sheet72518313.7%
Sheet84418324.0%
Sheet93818320.8%
Blank4818326.2%
Sheet104218323.0%
Sheet1161833.3%

I want the final result as below

    

BrandSheetGovRSTUtilization
Brand1Sheet113113398.5%
Sheet213113398.5%
Sheet312813396.2%
Sheet412513394.0%
Sheet512213391.7%
Sheet610413378.2%
Sheet713013397.7%
Blank9913374.4%
Sheet87513356.4%
Sheet98013360.2%
Sheet124113330.8%
Sheet111713312.8%
Brand2Sheet15050100.0%
Sheet25050100.0%
Sheet2495098.0%
Sheet4495098.0%
Sheet5495098.0%
Sheet6485096.0%
Sheet7255050.0%
Sheet8445088.0%
Sheet9385076.0%
Blank485096.0%
Sheet10425084.0%
Sheet1165012.0%

stalwar1theresaa

1 Solution

Accepted Solutions
sunny_talwar

Adding the total qualifier within set analysis? That is not right... it has to be outside of set analysis's curly brackets

Count(DISTINCT UNIX_ID_GOV)/

Count(DISTINCT TOTAL <Brand> {<Node_TS_Year, QuarterName, MonthName, WeekName, DateRange, CalcAuditSheetName, Sheet_Name>} UNIX_ID_RST)

View solution in original post

4 Replies
sunny_talwar

Maybe this

Count(DISTINCT Gov)/Count(DISTINCT TOTAL <Brand> Rst)

qlikview979
Specialist
Specialist

Hi sunny,

Thankyou

As per the above expression value is coming correct but also we need to ignore filter condition in the above expression

Actual expression:

Count(DISTINCT UNIX_ID_GOV)/Count( distinct total {<

Node_TS_Year=,QuarterName=,MonthName=,WeekName=,DateRange=,CalcAuditSheetName=,Sheet_Name=>}UNIX_ID_RST)

when we tried to add  brand like  below it is showing set modified error

Count(DISTINCT UNIX_ID_GOV)/Count( distinct total {< <Brand>

Node_TS_Year=,QuarterName=,MonthName=,WeekName=,DateRange=,CalcAuditSheetName=,Sheet_Name=>}UNIX_ID_RST)

so how to add below filters in set expression with brand group

Node_TS_Year=,QuarterName=,MonthName=,WeekName=,DateRange=,CalcAuditSheetName=,Sheet_Name=


Regards

Mahesh

sunny_talwar

Adding the total qualifier within set analysis? That is not right... it has to be outside of set analysis's curly brackets

Count(DISTINCT UNIX_ID_GOV)/

Count(DISTINCT TOTAL <Brand> {<Node_TS_Year, QuarterName, MonthName, WeekName, DateRange, CalcAuditSheetName, Sheet_Name>} UNIX_ID_RST)

farheenayesha
Creator
Creator
Author

Thank you so much Sunny. You are Great