Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
i need some help getting a line chart to work as needed.
I have a dimension of LeadTime (1-10) and a measure of Sum(Sales), i need it to be accumulated, so i am using the RangeSum function. so my full measure is..
RangeSum(
Below(
Sum({$<LeadTime={"<=$(vLeadTime)"}>}
Sales),
0,
NoOfRows())) !
what i want is for the measure to remain the same when a user selects a lead time. so currently, if i dont select a lead time, my chart goes to 1.6k. if i then select a lead time of 5, the chart changes to show around 750. i still want to see the 1.6k but i just want the dimension values to change to only show 0-5.
so basically i just want the chart to zoom in on the selections but still see the original value.
does that make sense?
i have attached a sample QVF.
Try this
RangeSum(
Below(
Sum({<LeadTime>}Sales),
0,
NoOfRows()))
* Avg({$<LeadTime={"<=$(vLeadTime)"}>}1)
Try this
RangeSum(
Below(
Sum({<LeadTime>}Sales),
0,
NoOfRows()))
* Avg({$<LeadTime={"<=$(vLeadTime)"}>}1)
Hi Sunny,
thanks very much, is there a way to hide the unwanted dimension values?
Uncheck 'Include zero values' under Add-ons -> Data handling
thanks for your help once again
Bit unrelated but curious to know what '* Avg({$<LeadTime={"<=$(vLeadTime)"}>}1)' this part of the function doing?
Since we are ignoring selection in LeadTime field in the main expression so that we can have accumulation beginning from the start rather than restarting it based on the selection. We somehow need to remove the data which is not true based on the set analysis. By using this expression, we are saying that where ever the set analysis condition is true, we will have 1, else 0. So, essentially, we are zeroing out the unwanted data to just show the line for LeadTime greater than selected LeadTime.
Does it make sense?
yeah understood more clearly when tried it myself!
Nice trick.