Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hI all.
I need to display in a Bar Cart the total number of the tickets for the last 30 days.I have a field named Severity where I have something like this Severity = S1, S2, S3, S4, S5,etc.
I want to display only the data for the last 30 days for a specific customer and I want to display the days without tickets too.
like below.
Dimensions :
Day
and
= IF( Customer LIKE 'xxx', Severity)
Expressions:
count({< Date = {"<=$(=DATE(MAX(Date)))>=$(=DATE(MAX(Date)-30))"}>}TICKETID)
and
sum(1) I use this to display all the dates with no data so this is blank.
I the below chart the data is selected ok only the problem is with the legend because I can see all the Severities, there suppose to be just the severities for the last 30 days but in may example are all for example S1 which is from 2 months ago.
Could someone please advise ?
The, You could mandatory to use Master Calendar to generate missing dates
Master:
LOAD TICKETID, Customer, Severity, OrderDate
FROM [Test samples xlsx.xlsx]
(ooxml, embedded labels, table is Sheet1);
Calendar_Table:
LOAD
Date(OrderDate) AS OrderDate,
Year(OrderDate) AS Year,
'Q' & Ceil(Month(OrderDate) / 3) AS Quarter,
Month(OrderDate) As Month,
Day(OrderDate) As Day,
Week(OrderDate) As Week;
Load Date(MinDate + IterNo() -1 ) AS OrderDate While (MinDate + IterNo() - 1) <= Num(MaxDate);
Load
Min(OrderDate) AS MinDate,
Max(OrderDate) AS MaxDate
RESIDENT Master;
Note - Calendar_Table not mandatory to carry all fields. You can continue with OrderDate alone for this case. It's upon you
Then, Create tabular table and follow the same
Use dimension as Day and Calc. Dimension for Customer
Expression is same but from presentation tab you must Un-Check the Zero counts for X-Axis scale
HTH
Anil
May be try this for Dimension
= IF( Match(Customer, 'xxx'), Severity)
OR Using Set analysis
count({< Date = {">=$(=DATE(MAX(Date)-30)) <=$(=DATE(MAX(Date)))"}, Customer = {xxx}>}TICKETID)
Hi Anil, I tried but this doesn't works in my case:(. Thanks
This, Doesn't for you?
count({< Date = {">=$(=DATE(MAX(Date-30))) <=$(=DATE(MAX(Date)))"}>}TICKETID)
I tried to add it to the expression and no results. I think , I need to restrict the dimension in some way... for the last 30 day... and maybe this would works. The problem when I restrict the data for the last 30 days I loose all the days with no data.
Usually, I don't prefer to use calculated dimension , Any way
Can you show image where you did?
and here I changed the dimension day to be op_date and I enable the second expression which was SUM(1) to display the null.
After I do all the above I can see that the legend now shows right but I need to see the dates with don't contains any tickets
This won't help to me. Will you provide sample? Instead xxx you could use your Value