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

Calculated Dimension with Set Analysis

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

1 Solution

Accepted Solutions
javierortiz79
Partner - Contributor II
Partner - Contributor II

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

View solution in original post

27 Replies
Anil_Babu_Samineni

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

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable

Hi

Add Calculated Dimension  like below

=if(Year>2015,Year)

jyothish8807
Master II
Master II

So if user select 2015 do you want to show sale from 2015 to 2018 ? or only 2015 ?

Br,

KC

Best Regards,
KC
shiveshsingh
Master
Master

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.

jyothish8807
Master II
Master II

Try like this:

If(GetFieldSelections(Year)='2015',Sum({<Year = {2015}>} Sale), Sum({<Year = {2016, 2017, 2018}>} Sale))

Br,

KC

Best Regards,
KC
taylor_jesse
Creator
Creator
Author

User can select 2015 data to view it but the default view when all selections are cleared should display data from 2016 to 2018.

taylor_jesse
Creator
Creator
Author

Do you want me to try this as the calculated dimension to as an expressions for the chart?

Thank you

javierortiz79
Partner - Contributor II
Partner - Contributor II

Put this in an expression:

If(GetSelectedCount(Year)>0,Sum({<Year = {'$(=Max(Year))'}>} Sale) , Sum({<Year = {'2016','2017','2018'}>} Sale))

vijetas42
Specialist
Specialist

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