Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Please help me on below requirement.
1. I need to Create two buttons i.e StatusOk and Status NotOk .
StatusOk button which displays the count of status for selected continent from attached sample.
Status NotOk button should display the count of missing records for the selected continent based on the date.
2.On the selection of StatusOk button it should navigate to the detail table which should display the respective records for the selected continent. and when we click on Status NotOk button it should display the missing records(i.e for Continent Asia missing record is 1 on 20170302)
For continent Asia the StatusOk is 11 and Status NotOk is 1( because for date 20170302 segment A the region south is missing )
for continent Europe the StatusOk is 12 and Status NotOk is 0
Continent | Segment | Region | Date | Status |
---|---|---|---|---|
Asia | A | North | 20170301 | 1 |
Asia | A | South | 20170301 | 1 |
Asia | B | North | 20170301 | 1 |
Asia | B | South | 20170301 | 1 |
Asia | C | North | 20170301 | 1 |
Asia | C | South | 20170301 | 1 |
Europe | A | North | 20170301 | 1 |
Europe | A | South | 20170301 | 1 |
Europe | B | North | 20170301 | 1 |
Europe | B | South | 20170301 | 1 |
Europe | C | North | 20170301 | 1 |
Europe | C | South | 20170301 | 1 |
Asia | A | North | 20170302 | 1 |
Asia | B | North | 20170302 | 1 |
Asia | B | South | 20170302 | 1 |
Asia | C | North | 20170302 | 1 |
Asia | C | South | 20170302 | 1 |
Europe | A | North | 20170302 | 1 |
Europe | A | South | 20170302 | 1 |
Europe | B | North | 20170302 | 1 |
Europe | B | South | 20170302 | 1 |
Europe | C | North | 20170302 | 1 |
Europe | C | South | 20170302 | 1 |
Thanks in advance
first you need to generate the missing Dates for each combination of Continent, Region & Segment. Below is the script for this
Data:
LOAD Continent,
Segment,
Region,
Continent&Segment&Region&date(date#(Date,'YYYYMMDD')) as Key1,
date(date#(Date,'YYYYMMDD')) as Date,
Status
FROM
[Data.xlsx]
(ooxml, embedded labels, table is Sheet1);
MinMax:
LOAD
min(Date) as MinDate,
max(Date) as MaxDate;
LOAD FieldValue('Date',RecNo()) as Date
AutoGenerate FieldValueCount('Date');
let vMinDate = Peek('MinDate',0,'MinMax');
let vMaxDate = Peek('MaxDate',0,'MinMax');
Dates:
LOAD date($(vMinDate) +IterNo()-1) as AllDate
AutoGenerate 1
While $(vMinDate) +IterNo()-1 <= $(vMaxDate);
Combination:
LOAD Continent,
Segment,
Region
Resident Data;
Left Join(Combination)
LOAD AllDate
Resident Dates;
DROP Table Dates;
Allkey:
LOAD *,
Continent&Segment&Region&AllDate as Key2
Resident Combination;
DROP Table Combination;
Concatenate(Data)
LOAD *
Resident Allkey
where not Exists(Key1,Key2);
DROP Tables Allkey;
DROP Fields Key2,Key1,AllDate;
Please help me with the below requirement.
1. I need to Create two buttons i.e StatusOk and Status NotOk .
StatusOk button which displays the count of status for selected continent from attached sample.
Status NotOk button should display the count of missing records for the selected continent based on the date.
2.On the selection of StatusOk button it should navigate to the detail table which should display the respective records for the selected continent. and when we click on Status NotOk button it should display the missing records(i.e for Continent Asia missing record is 1 on 20170302)
For continent Asia the StatusOk is 11 and Status NotOk is 1( because for date 20170302 segment A the region south is missing )
for continent Europe the StatusOk is 12 and Status NotOk is 0
Continent | Segment | Region | Date | Status |
---|---|---|---|---|
Asia | A | North | 20170301 | 1 |
Asia | A | South | 20170301 | 1 |
Asia | B | North | 20170301 | 1 |
Asia | B | South | 20170301 | 1 |
Asia | C | North | 20170301 | 1 |
Asia | C | South | 20170301 | 1 |
Europe | A | North | 20170301 | 1 |
Europe | A | South | 20170301 | 1 |
Europe | B | North | 20170301 | 1 |
Europe | B | South | 20170301 | 1 |
Europe | C | North | 20170301 | 1 |
Europe | C | South | 20170301 | 1 |
Asia | A | North | 20170302 | 1 |
Asia | B | North | 20170302 | 1 |
Asia | B | South | 20170302 | 1 |
Asia | C | North | 20170302 | 1 |
Asia | C | South | 20170302 | 1 |
Europe | A | North | 20170302 | 1 |
Europe | A | South | 20170302 | 1 |
Europe | B | North | 20170302 | 1 |
Europe | B | South | 20170302 | 1 |
Europe | C | North | 20170302 | 1 |
Europe | C | South | 20170302 | 1 |
Kavyashree,
for req 1)
If you need the count of status based on the current selected continent, you can add this variable, and then use the same variable to get the count in a text box
Will check and get back on how the button can be used for the same.
Don't create double threads for single Issue. Have a look Re: Missing Count Details
first you need to generate the missing Dates for each combination of Continent, Region & Segment. Below is the script for this
Data:
LOAD Continent,
Segment,
Region,
Continent&Segment&Region&date(date#(Date,'YYYYMMDD')) as Key1,
date(date#(Date,'YYYYMMDD')) as Date,
Status
FROM
[Data.xlsx]
(ooxml, embedded labels, table is Sheet1);
MinMax:
LOAD
min(Date) as MinDate,
max(Date) as MaxDate;
LOAD FieldValue('Date',RecNo()) as Date
AutoGenerate FieldValueCount('Date');
let vMinDate = Peek('MinDate',0,'MinMax');
let vMaxDate = Peek('MaxDate',0,'MinMax');
Dates:
LOAD date($(vMinDate) +IterNo()-1) as AllDate
AutoGenerate 1
While $(vMinDate) +IterNo()-1 <= $(vMaxDate);
Combination:
LOAD Continent,
Segment,
Region
Resident Data;
Left Join(Combination)
LOAD AllDate
Resident Dates;
DROP Table Dates;
Allkey:
LOAD *,
Continent&Segment&Region&AllDate as Key2
Resident Combination;
DROP Table Combination;
Concatenate(Data)
LOAD *
Resident Allkey
where not Exists(Key1,Key2);
DROP Tables Allkey;
DROP Fields Key2,Key1,AllDate;
Thanks eveyone for replies:)