Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
shayraber
Creator
Creator

selecting in field according to an 'IF' condition

Hi all,

I'm facing an issue which I haven't been able to solve or find a solution for up until now.

(It's a bit long to explain...)

I have a field of stores (among many other fields) and data from several years at the document.

Not all the stores were open all the time so let's say I have 20 stores on 2012, 25 stores on 2013 (6 stores opened and one closed) and 28 stores on 2014 (no store was close and 3 new stores opened)

I want to present table of store's performance related to other and compared to previous year.

The easiest way is to show the set of all stores which was open this year and previous year and compare their performances.

What I wish to do is an analysis which will show only the common stores of both years (the performance of stores which opened or closed this year will not be considered).

Until this point – things are working just fine. The issue starts when I want to be able to select that set of values (common stores).

  I want that the set of those common stores which were operational this year and previous year will be selected for further analysis. The stores field contains all possible stores records but only 25 of them are relevant while comparing 2014 to 2013 for example. How can I get to make that selection by an action/button/macro etc. WITHOUT acctually select those values.


i need those values to become "highlighted in green" automatically and without selecting them one by one


thanks in advance for your help

Shay

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Created a button. PFA. Is this what you want like?

View solution in original post

12 Replies
MK_QSL
MVP
MVP

May be by creating a flag in script itself.... Can you provide little dummy data for your question?

tresesco
MVP
MVP

Try trigger, Selection->Select Possible

shayraber
Creator
Creator
Author

dummy data I can't at the moment but regarding your reply - via script seems a lot of work/load time and will not be enough.

i want that the selction will be dynamic so flaging it should be with grouping all my fact table according to all fields.

i think that's won't work

shayraber
Creator
Creator
Author

but as i said - not all possible records at the fileds are relevant.

if i'm comparing the years of 2013-2014 i have 28 stores (according to my example) which are possible BUT only 25 of them (dismissing the 3 new stores opened at 2014) should be selected.

thats my problem

to create a trigger of select possible with an if condition and set analysis phrases - which doesn't work for me.

tresesco
MVP
MVP

Create a small sample qvw and share; explain the expected output against that data; you would probably get faster and more precise solutions.

CELAMBARASAN
Partner - Champion
Partner - Champion

What is your set analysis now?

You can use select in field action

Search value as

='(' & Concat({set analysis} DISTINCT FieldName, '|') & ')'

shayraber
Creator
Creator
Author

attaching

Not applicable

Hi,

FYI the attached app it might helps you, i added set analysis in the expression. If i was wrong feel free to let me know.

Satish

tresesco
MVP
MVP

I would rather resolve this using set analysis like:

=sum({<year={">=$(=Max(year)-1)"}>*<store=p({<year={"$(=Max(year))"}>})> *<store=p({<year={"$(=Max(year)-1)"}>})>}amount)

PFA