For example supplier
sites created : today, last 5 day, last
6-10 days, beyond 10 days
The desired output data would be like below:
Supplier
Site Status |
Today |
1 to 5
days |
6 to 10
days |
Beyond
10 Days |
ACTIVE |
0 |
25632 |
4 |
382 |
INACTIVE |
0 |
510 |
0 |
0 |
The steps to create analysis are:
2. Select the appropriate subject area: ere it is "Supplier - Supplier Real Time"
3. Select the columns:
4. The whole data will be grouped based on supplier site status: active or inactive
CASE WHEN TIMESTAMPDIFF(SQL_TSI_DAY, CURRENT_DATE, "-
General"."Created")=0THEN COUNT("- Supplier Site
Details"."Supplier Site Code")ELSE 0 END
One more Example: for
last days 1 to 5
CASE WHEN TIMESTAMPDIFF(SQL_TSI_DAY, "- General"."Created"
,CURRENT_DATE ) >= 1 and TIMESTAMPDIFF(SQL_TSI_DAY,"-
General"."Created" ,CURRENT_DATE )<=5 THEN COUNT("-
Supplier Site Details"."Supplier Site Code") ELSE 0 END
Similarly write for other days range.
10. Now sort the Today column: here it is descending order, so the arrow is downwards
a.
Add “aggregate rule” for each column as “Sum”.
If we do not do this then by default it takes as “REPORT_AGGREGATE” which will
not sum up data in column individually rather it sums of total. But wee need to
get sum as per column. So we need to do aggregate rule as “Sum”. Shown in
screenshot below : steps highlighted in yellow
a.
Exclude the columns: No of days and Number: Drag
the columns to excluded area as shown in below screenshot:
15. Now when we see the output, we would be getting the desired result:
Save the analysis.
No comments:
Post a Comment