Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
flo2
Contributor III
Contributor III

Weird effect of sum

Hello all,

I would like to understand how my set analysis could have a weird effect.

I have a Pivot table with country as dimensions and a count of a measure as expression.

And with this count as expression, there are values for each country ( normal values, everything is ok )

But what was needed as expression was a Sum of this same values, so i changed it.

But now, there is only one country ( country is the dimension ) who has value and all other ones are null. 

I don't have identifiers in my set analysis about country and i tried with a identifier <Country= > to have all countries in case but nothing changes. 

There is only one country ( one value of dimension ) who has the whole value when i use Sum

And when i use count, all dimensions have values...

Maybe i didn't explain very well, sorry 🙂

But i would to know if you had some ideas where this problem  could come from

thanks

Labels (3)
5 Replies
marcus_sommer

Maybe the measure isn't always numeric and then sum() could not return a valid result.

- Marcus

flo2
Contributor III
Contributor III
Author

Thanks for response

but can't be that it's really always numeric

marcus_sommer

Please provide more information - the used expression, some screenshots from the object + data + data-model.

- Marcus

flo2
Contributor III
Contributor III
Author

count({$<Year={"$(=max(Year))"},[expatriation country]=, [Code of contract]={'A}>} EndMonth*FLAG_NUMB*alt([Int. Soc.],0)/100)

Sum({$<Year={"$(=max(Year))"},[expatriation country]=, [Code of contract]={'A}>} EndMonth*FLAG_NUMB*alt([Int. Soc.],0)/100)

The values are numeric (EndMonth*FLAG_NUMB*alt([Int. Soc.],0)/100))

And the pivot table : As you see, in this case i put both set analysis, the count and the sum.

 

marcus_sommer

I suggest to check all possible values from:

EndMonth*FLAG_NUMB*alt([Int. Soc.],0)/100

again which values are really there. Especially the alt() function may mostly return the default-value of zero and then the entire multiplication/division will return zero. For the count() is this of course a valid value which could be counted.

- Marcus