Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I want to display the dimension as current week like below
My date field is Tran_Date
Day1
Day2
Day3
Day4
Day5
Day6 this is current week except sunday
how can I write the calculation condition?
Try this,
Backend
Temp:
Load * inline [
Date, ID
6/1/2018,2
6/2/2018,2
5/31/2018,2
5/30/2018,2
5/29/2018,2
5/28/2018,2
5/27/2018,2
5/26/2018,2
5/25/2018,2
5/24/2018,2
];
NoConcatenate
load *,
weekday(Date) as Weekday,
num(Date)as Numdate,
if(weekday(Date) = 'Sun',0,1) as sunday_flag
Resident Temp;
drop table Temp;
exit script;
frontend
char dimension as Weekday
expression as-
Count({<Numdate = {">=$(=num(WeekStart(Max(Numdate),0)))<=$(=max(Numdate))"}, sunday_flag = {'1'}>}ID)
Hi
Can you plz elaborate a bit.
Regards
Pratyush
hi
I want to show the bar chart for current weekdays excluding sunday with the attached format
so how to achieve this?
dim= Tran_Date
measure= count(id)
hi
You can exclude the dimension using this
=if(date(DateField,'WWWW')<>'Sunday',
pick(match(date(DateField,'WWWW'),'Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'),
'Day1','Day2','Day3','Day4','Day5','Day6')
Regards
Pratyush
Hi ,
thanks for reply. but I need to show current week only
now your expression is showing to over all I think?
or else can I restrict current week in measure? then how can I ?
count(Id)
You can use the max week values in your expression..can you try this?
count({<Week = {"$(=Max(Week))"}>}ID)
Is there any particular reason for not continuing this question in your thread Display name ?
if I use this I vill get including Sunday also?
i Want to exclude Sunday in this
yyes that was different and now logic got changed by cliebt