I have an interval statement that works fine on it's own but when I put it into an if clause it will give me days rather than minutes
Median (If(MeasureDenominator = 1 and MeasureGroup = 'ED', Interval(MeasureNumerator, 'm'))) will give me an answer in minutes but
If(MeasureGroup = 'ED', Median(If(MeasureDenominator = 1, Interval(MeasureNumerator, 'm'))), Sum(IF(MeasureDenominator = 1, MeasureNumerator))) gives me the correct number for the sum option, but if it is the interval it comes out in days not minutes.
Any ideas why this is not working? I'm wondering if I need to use set analysis, but I was not able to get the syntax right for that. Any help would be greatly appreciated.
You are mixing two different display formats -- Interval and Numeric -- in the same field. This is not possible, QV is choosing the numeric format for all values.
You can preserve the interval minutes formatting by converting to strings. Add a text() function around the interval(). You may have to do the same for the Sum(). You will lose the correct internal numeric values, which may be acceptable for your app.