I've been struggling with this for some time, so I'm hoping someone can help me. I'm using the calculation below for the current period and have another for comparison period. if I can get one to work so will the other.
Select a metric refers to countd(Car no) and avg(audit score). I am able to change the formula below by adding Countd(IF but the metrics are two different aggregations. I don't want users to loose the option to select. What can I do?
(DATETRUNC([Compare by], [Audit End]) =
DATETRUNC([Compare by], [Start date])
DATETRUNC('day', [Audit End]) <=
DATETRUNC('day', [Start date]))
[Select a metric]
Give the user a parameter with two values.
Make a calc [select a metric] that looks like this:
IF [Select parameter] = "COUNTD" then COUNTD([Car no]) ELSE avg([audit score]) END
Or, if you already have separate calcs for those two things, then just insert those calcs directly in that logic in place of the aggregates I spelled out.