Trend comparison for previous year - Current backlog average age

Hi team,

Firstly, Happy New Year.

I am attempting to build a report that illustrates a comparison between the Current backlog average age today and the same time last year i.e. is it up :arrow_up: or down :arrow_down:.

I am using the current calculation for issues resolved change, but I don’t think it shows the average age…

CASE WHEN NOT IsEmpty([measures].[Issues resolved])
Then
CASE WHEN CatchExceprtion(
[Measures].[Issues Resolved] -
( [Measures].[Issues Resolved],
[Time]. CurrentHeirarchyMember. PrevMember)
) > 0
THEN
",i class='far fa arrow-up' style='color:green'> </i>"
ELSE
"<i class='far fa arrow-down' style='color:red'> </i>"
END
END

and I use Markdown for the formatting.

Any advice on where I am going wrong please?

Cheers

Dave

Hi Dave,

You should choose the measure “Average resolution days” to see the average resolution time for resolved issues in each period.

Then, add standard calculation to see the same measure value one year ago. Click on “Average resolution days” column header → Add calculated → Time ago → year ago.
More details in the documentation: Add standard calculations based on a selected measure.

Now yuo have two options.

  1. Use conditional cell formatting to color rows based on both values. You might want to choose the option with the custom formula to compare column values. More details here: Conditional cell formatting

    The formatting rules might look like in the picture below.

    Here is the expression used for formatting:

    CASE 
      WHEN [Measures].[Average resolution days] > [Measures].[Average resolution days year ago]
      THEN "UP"
      WHEN [Measures].[Average resolution days] <= [Measures].[Average resolution days year ago]
      THEN "DOWN"
    END
    
  2. An alternative solution is to create a new calculated measure that would compare data in both columns and show arrows up or down based on both values.

    CASE 
      WHEN [Measures].[Average resolution days] > [Measures].[Average resolution days year ago]
      THEN "<i class='fa-solid fa-arrow-up' style='color:green'></i>"
      WHEN [Measures].[Average resolution days] <= [Measures].[Average resolution days year ago]
      THEN "<i class='fa-solid fa-arrow-down' style='color:red'></i>"
    END
    

    Note that you can refer to font awesome icons to show them in the chart. Copy the reference for the icon to ensure you are using the valid/supported icon.
    More details on calcauted measures and logical expressions are here: Calculated measures.

Both solutions in the report might look like in the picture below.

See also the Community post on measure formatting and icon representation:

Best,
Zane Support@eazyBI.com

1 Like

Thanks @zane.baranovska , I’ll have a paly with this today.

Appreciate your advice.

Cheers

Dave

Update: It worked a charm… thanks again for your advice. :slight_smile: :+1: :grinning:

1 Like