Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
joeybird
Creator III
Creator III

Chart always displays 30 days of data from chosen date

Hi

I want a bar chart to display individual sales data for 30 days from a chosen date

when a 'SalesDate' is chosen from a filter pane

I have made an expression that fixes current 30 days from max(SalesDate)

how can the expression be changes to chart dynamically changes to show 30 days sales from another chosen Sales Date?

Please help

1 Solution

Accepted Solutions
sunny_talwar

Mark

I will probably add the Date function and dollar sign expansion in there:

Sum({<SalesDate = {"$(='>=' & Date(Max(SalesDate)-30, 'YourDateFieldFormatHere') & '<=' & Date(Max(SalesDate), 'YourDateFieldFormatHere'))"}>} Measure)

Here YourDateFieldFormatHere is a placeholder and needs to be replaced with your Sales date field format.

View solution in original post

5 Replies
Mark_Little
Luminary
Luminary

HI

Try

SUM({<SalesDate={'>=Max(SalesDate)-30,<=Max(SalesDate) '}>}Value)

Mark

sunny_talwar

Mark

I will probably add the Date function and dollar sign expansion in there:

Sum({<SalesDate = {"$(='>=' & Date(Max(SalesDate)-30, 'YourDateFieldFormatHere') & '<=' & Date(Max(SalesDate), 'YourDateFieldFormatHere'))"}>} Measure)

Here YourDateFieldFormatHere is a placeholder and needs to be replaced with your Sales date field format.

joeybird
Creator III
Creator III
Author

Hi

this works, thank you however on the chart it does not allow you to drill down further on the chart to a single Sales Date

is this please possible?

please help

sunny_talwar

I thought you wanted to see 30 days from your max selected date? How would the expression know when to show 30 days and when to show just a single day?

joeybird
Creator III
Creator III
Author

Hi

added to the load an extra line

SalesDate,

date(SalesDate) as SDate,

used SDate as dimension, used your expression and it worked

thank you x