Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi!
In my project, there is a field with dates . I need to draw a graph using the last 14 days. Now I use a formula to build measurement : aggr (if (rank ([Date]) < 14 , [Date]), [Date]). This function works , but not quite as much as I would like. If you select multiple values in the filter Date, the graph is redrawn and it remains only the selected values . I want to show always exactly 14 values in this graph.
How can I fix my code?
Thank U!
Hi ,
Try like this:
In dimension take date:
In expression:
=sum({<date={"<=$(=max(date))>=$(=max(date)-14)"}>}amount)
Hope it works
Regards
KC
I added a picture to illustrate the problem (http://joxi.ru/bmok3ybtdpzRmy).
The graph should show only 14 values in bottom line.
Hi,
Try like this
Dimension: Date
Expression: =Sum({<Date={">=$(=Date(Max(Date)-13))<=$(=Date(Max(Date)))"}>} MeasureName)
In the above expression replace MeasureName with your field.
Hope this helps you.
Regards,
Jagan.
use alternate state option if you want to keep the same formula in the chart. make this chart with a diffrent state so that other any selection will not effect this chart.
Hi,
Did you checked with the dimension limits tab of the chart properties?Under show only drop down-->First,Largest,Smallest options and select limit to 14.
Hope it works.
Keep the expression as : sum(You Value)
Dimension: Date
Regards
KC