Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Count Of SEC irrespective of Date selection .

hi

I m creating a report as below:

SSS
APM
StoreCode
Region
State
City
Channel
Competitor
Date
Vol
SEC Count
ABCapm nameANDD13994south2TelenganaHyderabadGTApple28-06-20172003
ABCapm nameANDD13944south2TeleganaHyderabadGTSamsung28-06-20175002

Expressions:  Vol,SEC Count are expressions.

I want to count my number of SEC Code against Storecode  .  suppose ANDD13994 storecode has total 20 sec under him . then my

SEC Count should be 20  irrespective of Date selection.

StoreCodeDateSEC Code
ANDD1394427-06-201710
ANDD1394422-06-20175
ANDD1394420-06-20175


Used expression:

=if(Flag='SAMSUNG',count(DISTINCT{<SurveyDate=>} SECCode),

if(Flag='COMPETITORS',SUM(SecCountFact),count(DISTINCT{<Flag={'SAMSUNG'},SurveyDate=>}SECCode)+SUM({<Flag={'COMPETITORS'}>}SecCountFact)))

But this is bypassing my Date field in Date column also .

Please help

1 Reply
sunny_talwar

Try this

=If(Only({<SurveyDate=>} Flag) = 'SAMSUNG', Count(DISTINCT{<SurveyDate=>} SECCode),

If(Only({<SurveyDate=>} Flag) = 'COMPETITORS', Sum(SecCountFact), Count(DISTINCT{<Flag={'SAMSUNG'}, SurveyDate=>} SECCode) + Sum({<Flag={'COMPETITORS'}>} SecCountFact)))