Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Deal All,
I am using below expression to calculate my average
Avg(Aggr(count({$<Year=, Month=,Day=,
Date={">=$(=date(monthstart(max(Date))))<=$(=date(max(Date)))"}>}
distinct Txt_IssueID),Day))
The Date highlighted calculates 1st of month till max days when no Days selected in the Filter pane.
Eg: If Current_Date = 09-11-2023, then the date range will be --> 01-11-2023 till 09-11-2023 by default.
While user is selecting 02-11-2023 from the Day filter pane in the UI, then this expression calculates Average for JUST 02.
Expectation: It should calculate the average for 01 and 02.
Thanks in Advance.
Your expression already seems OK.
Maybe your expectation to remove Day in set analysis and see? otherwise, The users maybe selecting different fields and not from Date?
Avg(Aggr(count({$<Year=, Month=,Day=,
Date={">=$(=date(monthstart(max(Date))))<=$(=date(max(Date)))"}>}
distinct Txt_IssueID),Day))
Thanks for your revert, when we select Day this expression is calculating based the day selection.
I tried removing the Day, from the set expression but the date range is still the same.
Avg(Aggr(count({$<Year=, Month=,
Date={">=$(=date(monthstart(max(Date))))<=$(=date(max(Date)))"}>}
distinct Txt_IssueID),Day))
Output is not changing. It is showing Average for only 9th.
Try:
Avg({$<Year=, Month=,Day=,Date={">=$(=date(monthstart(max(Date))))<=$(=date(max(Date)))"}>}
Aggr({$<Year=, Month=,Day=,Date={">=$(=date(monthstart(max(Date))))<=$(=date(max(Date)))"}>}
count(distinct Txt_IssueID),Day))