Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
souadouert
Specialist
Specialist

set anlysiswith dimension

Hello,

I need to use the set analysis with one dimension,

if (total in 2017> total in2018, yes, no)

1 Solution

Accepted Solutions
sunny_talwar

Or use Only()

Aggr(If(Only({<Year = {2018}>}Sales) < Only({<Year = {2017}>}Sales), 'Yes', 'No'), Client)

View solution in original post

15 Replies
sunny_talwar

What is the dimension and what is the expression?

souadouert
Specialist
Specialist
Author

I have many clients and i need to calcult total sales for each client and i need to add a flag {yes , no}

if( total sales in 2018 < total sales in 2017, yes ,no)

sunny_talwar

In the script or in the chart?

souadouert
Specialist
Specialist
Author

dimesion in chart

sunny_talwar

So, you have client as one dimension and you want to add the second one as yes or no?

souadouert
Specialist
Specialist
Author

yes sunny

sunny_talwar

May be like this

Aggr(If(Sum({<Year = {2018}>}Sales) < Sum({<Year = {2017}>}Sales), 'Yes', 'No'), Client)

souadouert
Specialist
Specialist
Author

and if I have the total prepared in the script ?

sunny_talwar

Then this

Aggr(If(2018Sales < 2017Sales, 'Yes', 'No'), Client)