11 Replies Latest reply: Apr 13, 2016 12:31 AM by Yeo Poh sai

# GP% measure  , may i know how to make it display 19.5% ?

Hi All

I have below expression , it return 0.00 on GP% measure  , may i know how to make it display 19.5% ?

Hi All

I have below expression :-

(
Sum({<year = {\$(=Max(if(getselectedcount(year)=0,2015,year))-0)} , month = {"<=\$(=Max({<year={\$(=Max(if(getselectedcount(year)=0,2015,year)))}, sales = {'*'}>} month))"}, rEVENUE={"rEVENUE"} >} Amount*1)/Rate/1000
-
Sum({<year = {\$(=Max(if(getselectedcount(year)=0,2015,year))-0)} , month = {"<=\$(=Max({<year={\$(=Max(if(getselectedcount(year)=0,2015,year)))}, sales = {'*'}>} month))"}, cOST={"cOST"} >} Amount*-1)/Rate/1000
)
/
Sum({<year = {\$(=Max(if(getselectedcount(year)=0,2015,year))-0)} , month = {"<=\$(=Max({<year={\$(=Max(if(getselectedcount(year)=0,2015,year)))}, sales = {'*'}>} month))"}, rEVENUE={"rEVENUE"} >} Amount*1)/Rate/1000

May i know how to make it display 19.5% ? now it display 0.00

Paul

• ###### Re: GP% measure  , may i know how to make it display 19.5% ?

my QVF file

• ###### Re: GP% measure  , may i know how to make it display 19.5% ?

Do you know why I cannot see your chart?

• ###### Re: GP% measure  , may i know how to make it display 19.5% ?

Hi Sunny

sorry i re-send the QVF file again.

• ###### Re: GP% measure  , may i know how to make it display 19.5% ?

Note the extra parenthesis around the divisor to ensure that the division is correct and remove the 1000 scale factor to simplify:

Num((Sum({<year = {\$(=Max(if(getselectedcount(year)=0,2015,year))-0)} , month = {"<=\$(=Max({<year={\$(=Max(if(getselectedcount(year)=0,2015,year)))}, sales = {'*'}>} month))"}, rEVENUE={"rEVENUE"} >} Amount*1)/Rate)

-

(Sum({<year = {\$(=Max(if(getselectedcount(year)=0,2015,year))-0)} , month = {"<=\$(=Max({<year={\$(=Max(if(getselectedcount(year)=0,2015,year)))}, sales = {'*'}>} month))"}, cOST={"cOST"} >} Amount*-1)/Rate)

/

(Sum({<year = {\$(=Max(if(getselectedcount(year)=0,2015,year))-0)} , month = {"<=\$(=Max({<year={\$(=Max(if(getselectedcount(year)=0,2015,year)))}, sales = {'*'}>} month))"}, rEVENUE={"rEVENUE"} >} Amount*1)/Rate), '0.0%')

You could possible also remove the Rate value if it is the same at the top and the bottom...

• ###### Re: GP% measure  , may i know how to make it display 19.5% ?

Hi Jonathan

Can you send the QVF file to me ? As i try your expression , i get wrong value. , i get 346K. very big value.

Paul

• ###### Re: GP% measure  , may i know how to make it display 19.5% ?

Hi all

Does any one able to help me check why Jonathan expression look correct but return wrong GP% ?

Paul

• ###### Re: GP% measure  , may i know how to make it display 19.5% ?

Try this:

(Sum({<year = {\$(=Max(if(getselectedcount(year)=0,2015,year))-0)} , month = {"<=\$(=Max({<year={\$(=Max(if(getselectedcount(year)=0,2015,year)))}, sales = {'*'}>} month))"}, rEVENUE={"rEVENUE"} >} Amount*1)/Rate/1000

-Sum({<year = {\$(=Max(if(getselectedcount(year)=0,2015,year))-0)} , month = {"<=\$(=Max({<year={\$(=Max(if(getselectedcount(year)=0,2015,year)))}, sales = {'*'}>} month))"}, cOST={"cOST"} >} Amount*-1)/Rate/1000)/

(Sum({<year = {\$(=Max(if(getselectedcount(year)=0,2015,year))-0)} , month = {"<=\$(=Max({<year={\$(=Max(if(getselectedcount(year)=0,2015,year)))}, sales = {'*'}>} month))"}, rEVENUE={"rEVENUE"} >} Amount*1)/Rate/1000)

• ###### Re: GP% measure  , may i know how to make it display 19.5% ?

Hi Sunny

Finally it work.

I still unable to duplicate how you make it , it look simple , but not , i need to a cool mind to figure out why ?

Paul

• ###### Re: GP% measure  , may i know how to make it display 19.5% ?

I just copy and pasted the two expressions from (GP) / (Sales) (Note the parenthesis around the Sales's expression in the denominator)

• ###### Re: GP% measure  , may i know how to make it display 19.5% ?

Thanks,

Sunny

• ###### Re: GP% measure  , may i know how to make it display 19.5% ?

Hi Sunny

Done.

Paul