8 Replies Latest reply: Aug 1, 2012 1:13 PM by anutosh_dhar anutosh_dhar

set analysis

i am new in qv.

i want to do set analysis operation.

1)i have done database cloud.

2)in the cloud actualamount and budgetamount are present.

3)i want to show budget cost,actual cost,margin(budget/actual -1) for the seletd year as well as previous year in the same bar graph.

• Re: set analysis

Hi

Use like this

=Sum({<Year = {\$(vT)}>}budget cost) Where vT = max(Year)

=Sum({<Year = {\$(vT1)}>}budget cost) Where vT1 = max(Year)-1

Hope it helps

• Re: set analysis

please let me know whether is the following steps is ok or not

1)created two variables a)vT(for current year)  b)vT1(prev year),

2)created two more variables two holding this

=Sum({<Year = {\$(vT)}>}budget cost) Where vT = max(Year)

=Sum({<Year = {\$(vT1)}>}budget cost) Where vT1 = max(Year)-1

3)from the barchart select those variable name.

• Re: set analysis

Hi

Can you explain third point? Not sure, what is that?

Use no dimension or Year as dimension

• Re: set analysis

should i map all those variable into the expression?

• Re: set analysis

Hi

Yes, Use both expression ..

1st: =Sum({<Year = {\$(vT)}>}budget cost)

2nd: =Sum({<Year = {\$(vT1)}>}budget cost)

Hope it helps

• Re: set analysis

Hi,

You need to create the variable with values as below

vT should have value of =Max(YearFieldName) which gets the selected year

vT1 should have value of =Max(YearFieldName)-1 which gets the previous year

YearFieldName should be dimension.

Expression for the budget cost for current year and previous year

=Sum({<YearFieldName={\$(=vT),\$(=vT1)}>} budgetCost) for budget cost

=Sum({<YearFieldName={\$(=vT),\$(=vT1)}>} actualCost) for actual cost

=Sum({<YearFieldName={\$(=vT),\$(=vT1)}>} budgetCost)/Sum({<YearFieldName={\$(=vT),\$(=vT1)}>} actualCost) - 1 for margin