Date range from starting and end month

I have a custom date filter like last 12 months, whenever i select last 12 months it will show last 12 months data as shown in below.
image
in this i want to show what is the start month and end month in insight - Jan-23 to Feb-22

In other case - i have selected last 12 months but my data has as mentioned below.
image
in this i want to show what is the start month and end month in insight - Jan-23 to Aug-22
Available date range should display in the Insight. Please advise me.
Thank you.

You should be able to do this with an insight.

  • Add a calculated field called Range Value with the following defintion:
ifelse(
  {datetime} = minOver({datetime}, [], PRE_AGG),
  minOver({datetime}, [], PRE_AGG),
  maxOver({datetime}, [], PRE_AGG)
)

where {datetime} is your date/time field.

  • Add an insight visual. Choose Minimum computation

  • Make sure you add the same filter you have for the other visuals to the insight visual as well.

  • Add the new {Range Value} calculated field to the Time field well and choose Month aggregation for this field

  • Go to Customize narrative for the insight

  • Click + Add computation.

  • This time choose the Maximum computation and click Add on the next prompt

  • Set the following narrative text:

Range is: Minimum.timeValue.formattedValue  to  Maximum.timeValue.formattedValue

Note that the Minumum.timeValue… parts should be added as expressions as follows:

Narrative should show as below:

When i used the same logic able to get min and max but not as per my period selection which i have 12 months range.
can you please advise me.

@raju123 Hey, I have corrected my answer above as it was not accurate. Please try the new steps above and let me know :wink:

1 Like