Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have a chart with time on dimension and this simple set expression:
sum({<Product={'Product A','Product B','Product X','Product D'}>}Revenue)
For some reason, the chart doesn't change when I select a single product like Product A. Expected behaviour should be that the chart changes to show only Product A revenues. Any idea how this could happen? It doesn't seem to reflect any selection made on the Product listbox.
Use
sum({<Product *= {'Product A','Product B','Product X','Product D'}>}Revenue)
Use
sum({<Product *= {'Product A','Product B','Product X','Product D'}>}Revenue)
Thanks Manish - this works but why? Haven't seen this before.
That's because you override user selection in Product with a fixed list of porducts.
You need to use the set intersection operator * as Manish Kachhia suggested to keep your current user selections in the game.
Because the set analysis you wrote overwrites any selection in the field.
the *= modifier says to chose the Product that is both in the current selection and the specified list.
But I applied the same set analysis on another chart in the same sheet, with the same products, except it was
count({<Product = {'Product A','Product B','Product X','Product D'}>}orders) instead of sum. Why does it work here but not in the other chart?
Well, it shouldn't change, if this is the only aggregation in your chart.
Can you upload a small sample QVW?
I guess, Count and Sum works differently in the backend. Count just a need a pointer reference to count the record but Sum need to fetch the data so, it might not work
Sreeni