Reverse the order or weeks

Hi,
New to EazyBI, appreciate your help reg: two questions

  1. Week member of time dimension by default gives oldest weeks first. I want to show trend using line with latest week first. Can you please help with this? I thought order by dimension would do it

  1. Next once I show the trend line, I want hover over the line to provide a dynamic value whether or not the trend is upwards or downwards. I am hoping if I can calculate slope using my trend data and predict it based on the value of slope any point on the line. Is that doable? If not, is there a way I can calculate slope ?

Thanks

Hi @wizdom,

  1. All date members are ordered in ascending order by default. You might want to define a new calculated member in Time dimension Weekly hierarchy to get weeks in reverse order (descending).
    For example, to get weeks from the last half-year in the reverse order, you may use an expression like this:

    Aggregate(
      Order(
        [Time.Weekly].[Week].DateMembersBetween('6 month ago','today'),
        [Time.Weekly].CurrentHierarchyMember.StartDate, DESC)
    )
    

    Make sure to chose the Time.Weekly hierarchy also for the calculated member name to create it in a weekly hierarchy.

  2. You might want to use a standard calculation to get a Linear trend for a specific measure over a period in the report. In the report, click on a measure header and chose option Add calculated >> Linear trend. There are more details on standard calculations: https://docs.eazybi.com/eazybijira/analyze-and-visualize/create-reports#Createreports-Addstandardcalculationsbasedonaselectedmeasure

You might want to use a Line chart for data representation to keep the reverse order of weeks.

Best,
Zane / support@eazyBI.com

​There is another, more flexible option on how to get weeks or any time members on report rows in the reverse order.

  1. Define a new calculated measure in Measures that represents the first date of selected time member in the report. I would call it “Period start date”.

    [Time].CurrentHierarchyMember.StartDate
    

    Set measure formatting to some date format if you would like to use it some other reports as well.

  2. Add “Period start date” to the report on columns and order rows by it in descending order.

  3. Then Remove the calculated measure “Period start date” from the report, the order or rows will remain.

This calculated member will work for any Time hierarchy and period level.

Best,
Zane / support@eazyBI.com