Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HI there,
i have a user requirement. user would to have 3 date range pickers to control 3 lines in a chart.
My failure screenshot as such.
when i choose a date in period1 , it comes out a line, preiod 2 also comes out the same line. there are not 3 lines appeared.
for the issue, i am using simple measurement - sum(sales).
my sample data as pr attached.
i cant provide my qvf, due to company policy. please help guys!
Rgds
Jim
Hi, try to create 3 different Alternate States, for example, 'State1', 'State2', 'State3' and apply these states to each Date pickers. In graph add 3 different measures, so each will correspond to your dates selected in different states:
sum({State1} SALES)
sum({State2} SALES)
sum({State3} SALES)
Thanks! But in scenario , I have few filters as well, like states , store, region. So, user will select other filters and pick a date range in period 1 , 2 ,and 3.
With alternate state, how is it going to solve this scenario?
you can add these filters, like:
sum({State1 <states=$::states, store=$::store, region=$::region>} SALES)
so they will be applied also despite alternate state.
Will give it a try tomorrow my friend . Any other alternative?? How about using variable ? I don't really know how to Create a variable , and control it.
Hi there,
it actually work ,with the alternate state. But, how to put in the alternate state, in this variable? i have a variable and would like to use for alternate state as well.
Here it is, how should i put it in =$(=$(vAdhocExpression_Q(1)))
Rgds
Jim
I'm not sure is variables can be assigned to an alternate state. Maybe it is easier to create separate variables for each states? Or maybe try something like this:
if ($(vAdhocExpression_Q)=1, sum({State1 <states=$::states, region=$::region>} SALES) )
Or try to search in forum similar problems with variables in alternate states. I don't think you are the first to encounter this problem and nobody found a solution before.
I have try use the full set analysis like this, but the alternate state didnt seem to be working, did i put the alternate state at the correct place?
(Sum({[State1]<STORE={$(vInputStore)},MATERIAL={$(vInputNumber)},SALES_DAY={"$(vDateRange1)"}>}SALES)
+
Sum({[State1]<STORE={$(vInputStore)},MATERIAL={$(vInputNumber)},SALES_DAY={"$(vDateRange1)"}>}JOBS_AMT))
/$(vDelimeter)
Is it correct placing?
Rgds
Jim
As you can't set alternate state for variables, and as I understood you only choose dates per state, why not try this approach:
(IF(STORE='$(vInputStore)' and MATERIAL='$(vInputNumber)' and SALES_DAY='$(vDateRange1)', Sum({State1}SALES))
+
IF(STORE='$(vInputStore)' and MATERIAL='$(vInputNumber)' and SALES_DAY='$(vDateRange1)', Sum({State1}JOBS_AMT))
) / $(vDelimeter)