# Qlik Sense App Development

Partner

## Set Analysis Numerator, Denominator and Difference correct but % not working

Hi there

I want to display the difference amount as a % of the old/PY value.

I haven't had this issue before and think it may have to do with this measure that I inherited from the old QV model.

As you can see below I have commented out the divided by old as that is where it stops working? Am I interpreting something wrong. I did this on another model with a simple measure and basic set analysis and it worked fine?

```(Sum({<[Transaction Date] = {"<=\$(=vMaxTDate)"}>} If(Effect = 'Debit', [Transaction Amount], -[Transaction Amount])) //New

-

Sum({<[Transaction Date] = {"<=\$(=vMaxTDatePY)"}>} If(Effect = 'Debit', [Transaction Amount], -[Transaction Amount]))) //Old. Previous year.

//    /Sum({<[Transaction Date] = {"<=\$(=vMaxTDatePY)"}>} If(Effect = 'Debit', [Transaction Amount], -[Transaction Amount]))) //Old. Previous year.```
Labels (6)

• ### Set Analysis

1 Solution

Accepted Solutions
Partner

## Re: Set Analysis Numerator, Denominator and Difference correct but % not working

Hi,

Seems like you have an extra closing parentheses in the end of the expression.

- Pasi

4 Replies
Partner

## Re: Set Analysis Numerator, Denominator and Difference correct but % not working

Hi,

Seems like you have an extra closing parentheses in the end of the expression.

- Pasi

MVP

## Re: Set Analysis Numerator, Denominator and Difference correct but % not working

It looks like the previous year term is zero. You may need to override some date selections if you are making date selections in a field other than [Transaction Date].

You should also confirm that the variable vMaxTDatePY is what you expect and has a valid date.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Partner