Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have a set of data from 2015 to 2018 however I will like to create a calculated dimension for a chart that only displays data from 2016 to 2018 but I will also add a filter to the tab where the user can select to see the 2015 data if they want to just won't show in the chart as the default view.
Any help.
Thank you
The set Analysis will limit the dimension and the result to 2015 if selected or 2015,2016,2016, you don't need a calculated dimension.
put this in an expression.
=IF(GetSelectedCount(Year)>0,Sum({<Year = {'$(=Max(Year))'},metric_name={'Non-Billable Cost'}>} metrictotal)/sum(hours_units) , Sum({<Year = {'2016','2017','2018'},metric_name={'Non-Billable Cost'}>} metrictotal)/sum(hours_units))
Let's talk in 2 tasks
I have a set of data from 2015 to 2018 however I will like to create a calculated dimension for a chart that only displays data from 2016 to 2018
Instead of creating dimension - I suggest you to restrict in expression
Sum({<Year = {2016, 2017, 2018}>} Sales)
but I will also add a filter to the tab where the user can select to see the 2015 data if they want to just won't show in the chart as the default view.
Not entirely sure, But whole expression should look like this
If(GetSelectedCount(Year)=0, Sum({<Year = {2016, 2017, 2018}>} Sales), Sum(Sales))
Hi
Add Calculated Dimension like below
=if(Year>2015,Year)
So if user select 2015 do you want to show sale from 2015 to 2018 ? or only 2015 ?
Br,
KC
for you second requirement, you can create a separate chart and set the visibility like if selected year = 2015, then show the chart with 2015 values.
Try like this:
If(GetFieldSelections(Year)='2015',Sum({<Year = {2015}>} Sale), Sum({<Year = {2016, 2017, 2018}>} Sale))
Br,
KC
User can select 2015 data to view it but the default view when all selections are cleared should display data from 2016 to 2018.
Do you want me to try this as the calculated dimension to as an expressions for the chart?
Thank you
Put this in an expression:
If(GetSelectedCount(Year)>0,Sum({<Year = {'$(=Max(Year))'}>} Sale) , Sum({<Year = {'2016','2017','2018'}>} Sale))
do you want particular chart to show default data 2016 to 2018 or whole dashboard?
If you want whole dashboard to show default data for 2016 to 2018 then you can apply document level trigger
or if you want for any particular chart then you can create two different calculated dimension one when user select any of the year then,
expression, sum(sale)
condition,GetSelectedCount(year)>0
and other expression should be,sum({<year={'2016','2017','2018'}>}sale)
condition,GetSelectedCount(year)=0