Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a line graph that displays counts by month.
I want it to default to a 13 month period but still allow a user to interact with the data.
Here's my Measure:
if(GetSelectedCount(C_Surgery_Date)>0,
count({<ORCaseVolumeFlag={1}>} LOG_ID)
,count({<[_R12]={1},ORCaseVolumeFlag={1}>} LOG_ID))//rolling 13 months
here's my Dimension: monthname(C_Surgery_Date)
The default view is just right.
Clicking on one of the datapoints within the graph (the 13 month range) filters just right.
My problem happens when using a filter pane for C_Surgery_Date and selecting something outside of the 13 months.
The graph is replaced with the text: The selections generated no data for this chart.
I turned on show zero values after clearing the selection and now it looks like everything outside that 13 month range is zero.
If I just use count({<ORCaseVolumeFlag={1}>} LOG_ID) it shows everything.
How can I set this up to meet my objective?
Using Sense 3.0
thanks!
Found out the answer for this one... getselectedcount does not work on a derived field.
I was trying to see if a month (C_Surgery_Date) was selected, but that field was created in the app load script.
Moved it to the transform and it worked fine.
So you want to show previous 13 months from the selected date
or
previous 13 from the Max(date) if nothing is selected?
is that correct?
I want the default view of the graph to be 13 months. If a user selects one of the dates in that range, the graph only shows that date and that's fine. All other visualizations will filter to that date and that's what we want.
The problem is that when you select a date outside of the 13 months shown on the graph, everything goes to zero.
how are you filtering for 13 months data in the expression
is this the Flag you created for Prior 13 months? ORCaseVolumeFlag
My prior 13 month flag is: [_R12]={1}
OK... more digging on this. I created a KPI with the following value: GetSelectedCount(C_Surgery_Date) and no matter what months I select, the KPI doesn't change... it stays ate zero. I think that's my problem.
Does GetSelectedCount have problems counting months? I've tried lots of iterations of modifying the date field but nothing is working. thx
Can you post a sample app
I have attached a sample. thanks!
I have attached a sample. thanks!
I will check and get back to you