LACs share grouping key and do not work anyways

Hello Team!

I was trying to create LAC calculation using dynamic grouping key.

To make it super simple, I created the following example:

Where Category or product is a column driven by parameter (two options, Category and Product) and measure columns are duplicates of itself and look like that:

It works well in this table, but when I want to combine these two measures (e.g. sum them) this is the result I get:

And this is how the calculation looks like:

This is basically the same thing added one to another. They have the same key.

Is this a known issue? Does anybody know if there is a way to fix it?
In other words, I want to combine two LACs using same, dynamic, parameter-driven grouping key in one calculation.

This is the link → Group by

Thanks a ton!

Hi @Filo,
So for your case, are you trying to add the ‘coolness by groupby’ with the ‘coolness by groupby2’ columns?
If you’re trying to add 2 of the same thing, like in this example, you can change your ‘test’ calc. field to be

sum(coolness, [{Category or product}])*2

If you’re trying to accomplish something different, please provide some further detail on what you’d like the outcome to be.

Hello @Brett !

Thanks a lot for reaching out!

The problem I am facing is that I need to combine two LAC measures that have dynamic grouping key (based on same parameter) in one calculation.
When I try to have two of them in one calculation, QS tells me they need to have the same grouping key.
I tried to simplify the example for the sake of finding the solution, and it looks to me you can have exactly the same thing duplicated, just like in the example above, and the calculation does not work anyways.

So this works:
Sum(Coolness, [Category]) + Sum(Coolness,[Category])

but this does not:

Sum(Coolness,[Category or product]) + Sum(Coolness,[Category or product])

Where Category is just a column and Category or product is a column with dynamic value based of parameter.

Please let me know if this makes sense :slight_smile:

The use case for me is that my clients want to switch between aggregations using parameters for various calculations of various measures.

Hi @Filo,
Check out the below Arena view, I was able to get your calculation working by changing the functions to sumOver.

Group by

Thanks a lot @Brett , I seems to be working!

I wonder if there are any differences between the method I used and sumover?

P.S. Do you think this could be useful to report that as a bug/problem? I see no reason my method shouldn’t work, this is just QS not accepting the result?

Hi @Filo,
I’m glad this worked for your case. In reference to the differences between using sum and sumOver, there’s this great article that dives deeper into LAC-A vs LAC-W.