I’m trying to have time period control (daily, weekly, monthly, Quarterly) and date range controls (start date) and (end date)
I have created 3 parameters as below;
1- (Name
TimePeriod
Data type (Not alterable after creation)
String
Values (Not alterable after creation)
Single value
Static default value
Daily)
2- (Name
StartDate
Data type (Not alterable after creation)
Datetime
Time granularity
Default date
Will always be 2023/01/01
Fixed date
2023/01/01)
3- (Name
EndDate
Data type (Not alterable after creation)
Datetime
Time granularity
Default date
Rolling: Today, 2024/05/19
Fixed date
Relative date
Today)
and 4 calculated fields for the periods as below;
Reporting Week: truncDate(‘WK’,date)
Reporting Month: truncDate(‘MM’,date)
Reporting Quarter: truncDate(‘Q’,date)
Reporting Date:
ifelse
(
${TimePeriod} = ‘Daily’, date,
${TimePeriod} = ‘Weekly’, {Reporting Week},
${TimePeriod} = ‘Monthly’, {Reporting Month},
${TimePeriod} = ‘Quarterly’, {Reporting Quarter},
null
)
I have defined specific values for the time period control (drop down menu)
Daily
Monthly
Quarterly
Weekly
And for the date range filter:
“Reporting Date
Between - StartDate and EndDate”
Filter type
TimeRangeFilter
Condition
BETWEEN
Use parameters
Start date parameter - start date
Include start date
End date parameter - end date
Include end date
My Difficulty is when I select Monthly time period and the start date not the first of the month the whole month will be ignored and show no data. I have to select 1st day of the month as start date to get the selected month’s data.
In above snap Jan’s data didn’t show and Feb’s data shown for whole Feb!
What I’m trying to achieve here is to to show data on monthly view based on exact starting date to month and exact end date.