Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi
I m creating a report as below:
|
|
|
|
|
|
|
|
|
|
| |||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ABC | apm name | ANDD13994 | south2 | Telengana | Hyderabad | GT | Apple | 28-06-2017 | 200 | 3 | |||||||||||||||||||||||
ABC | apm name | ANDD13944 | south2 | Telegana | Hyderabad | GT | Samsung | 28-06-2017 | 500 | 2 |
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.
StoreCode | Date | SEC Code |
---|---|---|
ANDD13944 | 27-06-2017 | 10 |
ANDD13944 | 22-06-2017 | 5 |
ANDD13944 | 20-06-2017 | 5 |
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
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)))