Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Simple set analysis query..

Hello Experts,

I am having a simple Set Analysis expression query. It feels like I have done this before, but unable to do it now..I am trying to get the data for the maximum available month and tried the below expressions, none of this work. I have data till May in this case and June data comes in July... can anyone help with this?

if   (sum({<month = month(today())>}reportValue)<>0, 

num(sum({<month = 'max(=month)'>}reportValue), $(vNumberForm)),'')

By default I want my chart to show the maximum available data and change only when we select other dates.....

Thanks in Advance,

Mady

1 Solution

Accepted Solutions
Not applicable
Author

Hello Martina,

I appreciate your time and effort in trying to help me with this situation. I figured out a way for this issue and I am hiding columns in Pivot and using multiple expressions, which solved my problem.


Thanks for all the help,

Mady

View solution in original post

14 Replies
brenner_martina
Partner - Specialist II
Partner - Specialist II

Hi,

the correct set analysis syntax is like this:

if   (sum({<month = {$(=Only(month(today())))}>} reportValue)<>0, 

num(sum({<month = {"$(=max(month))"}>} reportValue), $(vNumberForm)),'')

Not applicable
Author

Hello Martina,

I tried the solution provided by you, but it returns 0 and I am sure when I do a sum(reportValue) and select May for which I have data till, I get a number....

By default the chart should show the last available month data and change only when a different month or year is selected.....

Any ideas?

Thanks Again,

brenner_martina
Partner - Specialist II
Partner - Specialist II

Hi,

did you select a month? Your expression gives you a result only if is select 1 month.

Not applicable
Author

Unfortunately, now matter if i select a month or not, it still shows me 0 and the problem is if I have to select a month and then it shows a number, then all I have to do is sum(reportValue) and select month May and get the exact number....but i want the chart to show the maximum month value by default..

Any more ideas please...

brenner_martina
Partner - Specialist II
Partner - Specialist II

Hi,

maybe you enter better something like this:

If(GetSelectedCount(month)=1,

num(sum({<month = {"$(=max(month))"}>} reportValue), $(vNumberForm)),

num(sum({<month = {"$(=Only(month(today())))"}>} reportValue), $(vNumberForm)))

Not applicable
Author

Martina, I tried this but have the same issue, I did not understand how would it solve my problem, if I add GetSelectedCount(month)=1 in my set analysis expression. I think by adding this, we are saying if the selected month count is 1 then do the calculation...

I want my Pivot to check for the max month Data before making any selections and show it only for that month, however it should change only when the user selects a different month or year....

Cant we write something to show it?? I am sure most of us might have already done that.

brenner_martina
Partner - Specialist II
Partner - Specialist II

Hi,

pardon, I did not understand, what did you want to do! Could you please post an example?

Not applicable
Author

Hi Try the following

sum({$<OffenePostenHistorie.BELDATUM = {'<=$(FDatum)'}>} OffenePostenHistorie.OBETRAG)

regards

Not applicable
Author

Hello Martina,

I have attached the Pivot table as seen in the image here. I have the below expression as seen to get this data :

if   (sum(reportValue)<>0, 

num(sum(reportValue), $(vNumberForm)),'')

which is fine, But i want this chart to show by default the maximum available month data in my case its May 2011. I want the set analysis to check for the maximum month and year available and show by default, later on, when I click on April 2011 or any other selection, it should change. Is this possible??

Thank again,LikeThis.JPG