10 Replies Latest reply: Feb 9, 2017 2:57 AM by Mohammad Sarif

# Dynamic Dinominator

Hi All,

I have denominator in division calculation like below:

RangeSum(Value) /

((4*Count (distinct PLANT)) - Count({<Dates1 = {"\$(=Date(Date#('\$(vDATE)','M/D/YYYY') - 7))","\$(=Date(Date#('\$(vDATE)','M/D/YYYY') - 14))","\$(=Date(Date#('\$(vDATE)','M/D/YYYY') - 21))","\$(=Date(Date#('\$(vDATE)','M/D/YYYY') - 28))"} >}Dates))

But my chart is behaving wrongly. However If we plot the same expression of denominator in Single KPI, it returning a correct numeric value.

Can you please help.

Thanks,

Sarif

• ###### Re: Dynamic Dinominator

can you post a sample app that demonstrates the issue

Preparing examples for Upload - Reduction and Data Scrambling

• ###### Re: Dynamic Dinominator

May be you can try with Sum() instead of RangeSum().

• ###### Re: Dynamic Dinominator

no I need to use RangeSum.

My issue is if keep 6 or 7 as numeric, it is working fine. But when the same thing I am trying to replace with the expression like below, then the chart is messing up.

((4*Count (distinct PLANT)) - Count({<Dates1 = {"\$(=Date(Date#('\$(vDATE)','M/D/YYYY') - 7))","\$(=Date(Date#('\$(vDATE)','M/D/YYYY') - 14))","\$(=Date(Date#('\$(vDATE)','M/D/YYYY') - 21))","\$(=Date(Date#('\$(vDATE)','M/D/YYYY') - 28))"} >}Dates))

Could you please help.

Thanks,

Sarif

• ###### Re: Dynamic Dinominator

Could you post your sample qvw? Try putting your denominator under dollar expansion like : \$ ( <denominator>)

• ###### Re: Dynamic Dinominator

Not working sir...

• ###### Re: Dynamic Dinominator

Ok, \$ expansion is not working, what about sharing your sample qvw?

• ###### Re: Dynamic Dinominator

Hi Tresesco,

I am attaching the qvf file. Please check the last sheet. That is Order, Delv Line Cnts with Avgs_Holidays_V2.

Please check and help.

Thanks,

Sarif

• ###### Re: Dynamic Dinominator

My earlier sense installation is somehow not working. Could you post a qvw or I am not sure when could I get a chance/enough time for re-downloading the latest sense and install.

• ###### Re: Dynamic Dinominator

As you mentioned that

if you are using denominator as expression then it is working.

Try this:

Div(RangeSum(Value),((4*Count (distinct PLANT)) - Count({<Dates1 = {"\$(=Date(Date#('\$(vDATE)','M/D/YYYY') - 7))","\$(=Date(Date#('\$(vDATE)','M/D/YYYY') - 14))","\$(=Date(Date#('\$(vDATE)','M/D/YYYY') - 21))","\$(=Date(Date#('\$(vDATE)','M/D/YYYY') - 28))"} >}Dates)))

• ###### Re: Dynamic Dinominator

Same result..and one more thing .. the issue is happening when I am selecting more than one Plant. Basically when two plants are sharing same holiday then it is creating issue.

Thanks,

Sarif