Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
mhmmd_srf
Creator II
Creator II

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

10 Replies
vinieme12
Champion III
Champion III

can you post a sample app that demonstrates the issue

Preparing examples for Upload - Reduction and Data Scrambling

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
tresesco
MVP
MVP

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

mhmmd_srf
Creator II
Creator II
Author

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

tresesco
MVP
MVP

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

mhmmd_srf
Creator II
Creator II
Author

Not working sir... 

tresesco
MVP
MVP

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

mhmmd_srf
Creator II
Creator II
Author

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

gowtham_patnaik
Contributor III
Contributor III

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)))

tresesco
MVP
MVP

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.