A complex query with Bex

Question: Hi,
I have a serius problem. I must do a complex query.

Structure of the query:

AGENT PRODUCT_HIER MATERIAL QTY QTY_PRODUCT_HIER
------------------------------------------------------------------------
AGENT1 PH1 MAT1 100 300
AGENT2 PH1 MAT2 200 300
AGENT3 PH2 MAT3 500 500
------------------------------------------------------------------------

The QTY_PRODUCT_HIER is the sum of QTY for a PRODUCT_HIER independently from the AGENT and the MATERIAL. In the example, the sum of PH1 is 300 (100+200) and the sum of PH2 is 500 (500).

How can I resolve this query via web ?

Thank you
_________________
Giovanni Guarino
http://dlab.cineca.com

Answer:
Use Fonction SUMCT.
_________________
When my car stops, I first look at the gasoline's level before dismounting the engine.


Tuly Idiot's fan club active member.

Answer:
Hi, thank you for your rensponse.
I can not use the function SUMCT because the SUMCT display the sum of PH1 for AGENT1. I would like to have the sum of PH1 indipendently from the AGENT.

Bye
_________________
Giovanni Guarino
http://dlab.cineca.com

Answer:
Use SUMCT and suppress result for this KF
_________________
When my car stops, I first look at the gasoline's level before dismounting the engine.


Tuly Idiot's fan club active member.

Answer:
i believe a constant selection setting should take care of it. the Key Figure "QTY_PRODUCT_HIER " will be a selection (RKF) based on "QTY" with a restirction on "AGENT" don't pull in any specific AGENTs** just bring in the characteristic, then right click and set "Constant Selection." do the same thing with "MATERIAL" when you save the query you will probably get a warning saying that constant selection is not available, but in my tests it still worked.

** an additional note: if you have additional agents or materials in your cube which should not be displayed in this query you will have to bring in specific AGENT and MATERIAL values in your restriction (e.g. you want the MAT1 MAT2 and MAT3 only while MAT4-MAT9 have transactions in the cube; restrict on MAT1-MAT3 in the RKF, same with AGENT; and know that making these restriction globally will not help with the calculation).
_________________
when in danger or in doubt, run in circles, scream and shout.

Answer:
Hi,
Thank you for your suggestion. I have created a selection.

Thank you
_________________
Giovanni Guarino
http://dlab.cineca.com
Copyright ?2007 - 2008 www.jt77.com