Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calculated sums ignoring selection - how to apply it?

Hi Guys,

I've got a question - this time simple, I hope.

Please see my attachment. There are two straight tables here:
1 Budget
2 Budget documents

In the first table, we've got sums for budget:

Marketing budget calculated: all accounts 645-3-* side Ct (strona = 1)
Marketing budget usage: all accounts 645-3-* side Dt (strona = 0)


In the second table we can see details (I had to remove the documents so you actually can see only values and on which account that document is). As we can see, there's only one document for account 645-3-*: it is for account 645-3-7173, side Dt (strona = 0, sorry for polish names here ). When I'm selecting this document or particular account from listboxes above I want to reflect this selection on first table - but it doesn't work. Can anyone tell me what to do in order to have this selection working here?


Thanks in advance for any help!

Best regards,

Paweł

1 Solution

Accepted Solutions
Not applicable
Author

Try this,

Exp1 :

=if(GetSelectedCount([Konto BRD])>0, sum(

  {$<strona = {"1"}>}

  [Wartosc BRD]*[Znak Pozycji Budzetu BRD]

  ),

  sum(

  {$<[Konto BRD] = {"645-3-*"}, strona = {"1"}>}

  [Wartosc BRD]*[Znak Pozycji Budzetu BRD]))

Exp2:

=if(GetSelectedCount([Konto BRD])>0, sum(

  {$<strona = {"0"}>}

  [Wartosc BRD]*[Znak Pozycji Budzetu BRD]

  ),

  sum(

  {$<[Konto BRD] = {"645-3-*"}, strona = {"0"}>}

  [Wartosc BRD]*[Znak Pozycji Budzetu BRD]))

Also add the Dimension [Konto BRD] to understand the working better.

Thanks,

Prabhu

View solution in original post

4 Replies
Not applicable
Author

Hi,

Since you have the condition strona = {"1"} in first exp of first table, it overrides the current selection.

What functionality you exactly need when you select strona?

If you disable 1st exp, then the selection will get applied.

Thanks,

Prabhu

Not applicable
Author

Hi Prabhu,

Thank you for answering so quickly.

Is it possible to achieve the selection not getting overrided (sums for only selected account when I select it) and have condition strona = 1 (or strona = 0 in next column) preserved?


Thanks!
Pawel

Not applicable
Author

Try this,

Exp1 :

=if(GetSelectedCount([Konto BRD])>0, sum(

  {$<strona = {"1"}>}

  [Wartosc BRD]*[Znak Pozycji Budzetu BRD]

  ),

  sum(

  {$<[Konto BRD] = {"645-3-*"}, strona = {"1"}>}

  [Wartosc BRD]*[Znak Pozycji Budzetu BRD]))

Exp2:

=if(GetSelectedCount([Konto BRD])>0, sum(

  {$<strona = {"0"}>}

  [Wartosc BRD]*[Znak Pozycji Budzetu BRD]

  ),

  sum(

  {$<[Konto BRD] = {"645-3-*"}, strona = {"0"}>}

  [Wartosc BRD]*[Znak Pozycji Budzetu BRD]))

Also add the Dimension [Konto BRD] to understand the working better.

Thanks,

Prabhu

Not applicable
Author

Thanks so much Prabhu!

I know GetSelectedCount but it didn't come to my mind to use thi function here. I added [Konto BRD] before your reply and it helped here but I was curious whether we manage to apply the selection regardless.

Have anice day!


Best regards,
Paweł