cancel
Showing results for 
Search instead for 
Did you mean: 

Sum or Count IF variable = x (WEBI)

09-27-2022 4:17 AM
neilb-1 Discoverer
2302 views 3 comments
SAP Managed Tags
Subscribe

So, apologies first - this seems like a fairly basic question, but I just can't find the answer.

I have a table with SLA performance, where every row has either 'Pass' or 'Fail' (the result of a variable that calculates this out).

I want a count of 'failed' tickets which seems straight forward, but I keep getting a #MULTIVALUE error.

I thought something like;

=Count([TICKETS]) Where([Breached Ticket State]="Fail")

or I tried adding another variable called "Numeric Breach";

=If([Breached Ticket State]="Fail") Then 1 Else 0

and then a simple '=sum([Numeric Breach])'

But no matter what I do they all fail.

Notes:

[Breached Ticket State] is set as a Dimension, type:Text

[Numeric Breach] is set as a Dimension, type:Number

Accepted Solutions (0)

Answers (1)

Answers (1)

zeeshanshafqat
Active Participant

Create a measured variable of "[Numeric Breach]" and then use the sum function you absolutely get a positive result.

if you get a "MultiValue" Error after creating and using measure variable then go to your backed and create measure of your variable and change number to sum then you also get a positive result.

neilb-1
Discoverer
0 Likes

Thanks- I tried changing "[Numeric Breach]" to a measure, but sum still gives Multivalue.

If I understand your second sentence, you suggest I should change the [Numeric Breach] measure to a SUM in the Aggregate Function option in the Query Panel? As this is a variable, it does not show in the list of Result Objects, so I am unsure how to change this. The 'Type' field of the variable is greyed out, both for existing and new variables.