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

27 Replies
javierortiz79
Partner - Contributor II
Partner - Contributor II

It looks like the values are 0 , use an If Statement then,

Like this,

If( (Expression you already have)>0, (Expression you already have)  , )


Javier

taylor_jesse
Creator
Creator
Author

This expression worked however the legend still shows 2015 but the lines just show 2016 to 2018. How can I not make the legend show 2015?

Thank you

javierortiz79
Partner - Contributor II
Partner - Contributor II

ok,

Create an expression for each Year

javierortiz79
Partner - Contributor II
Partner - Contributor II

If you want to send me the QVW I can do it for you

taylor_jesse
Creator
Creator
Author

How can I share it without it giving you an error when you load it.

taylor_jesse
Creator
Creator
Author

Hi,

How can I apply the same logic to  (sum(revenue)-sum(metrictotal))/sum(revenue)

Tried using

=If(GetSelectedCount(Year)=0, (sum({$<Year = {2016, 2017, 2018}>} revenue)- sum({$<Year = {2016, 2017, 2018}>} metrictotal))/(sum({$<Year = {2016, 2017, 2018}>} revenue)))


but whenever I select 2015 in the filter it gives me no data to display but it should at least display something since the datasource contains data from 2015.


Thank you

taylor_jesse
Creator
Creator
Author

Hi,

How can I apply the same logic to  (sum(revenue)-sum(metrictotal))/sum(revenue)

Tried using

=If(GetSelectedCount(Year)=0, (sum({$<Year = {2016, 2017, 2018}>} revenue)- sum({$<Year = {2016, 2017, 2018}>} metrictotal))/(sum({$<Year = {2016, 2017, 2018}>} revenue)))


but whenever I select 2015 in the filter it gives me no data to display but it should at least display something since the datasource contains data from 2015.


Thank you

taylor_jesse
Creator
Creator
Author

Hi,

How can I apply the same logic to  (sum(revenue)-sum(metrictotal))/sum(revenue)

Tried using

=If(GetSelectedCount(Year)=0, (sum({$<Year = {2016, 2017, 2018}>} revenue)- sum({$<Year = {2016, 2017, 2018}>} metrictotal))/(sum({$<Year = {2016, 2017, 2018}>} revenue)))


but whenever I select 2015 in the filter it gives me no data to display but it should at least display something since the datasource contains data from 2015.


Thank you