Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set analysis operator help

I'm trying to create an expression that will look at sales for the current fiscal year and the current month. I also need to use a bookmark in my set analysis to only includes certain products (too many to use in set analysis). My problem lies with the intersection of the current selections and the bookmark. I do want to use the current selections, but I want to explicitly define the month as the current month.

Sum({$*BM08 <[Fiscal Year]={'$(FiscalCurrentYear)'},Month={$(=Month(Today()))}}>}[Sales Amount])

With the above expression, when no month is selected or the current month is selected, it works. But, when any month other than the current month is selected, I get no records even if its in the current fiscal year. Is there a way I can explicitly define the year and month, but still include current selections and the bookmark?

1 Solution

Accepted Solutions
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Try swapping the two Identifiers:

Sum({BM08 * $<[Fiscal Year]={'$(FiscalCurrentYear)'},Month={$(=Month(Today()))}}>}[Sales Amount])


The logic being: you are trying to replace Year and Month in the current selections, not in your bookmark. Keep in mind that the modifiers apply to each ID, not to both of them together. The generic syntax is:


ID1 <Modifiers> * ID2 <Modifiers>


In your case, ID1 = BM08, with no modifiers

ID2 = $ (Current selections), withe the Modifiers for year and Month.


best,


Oleg Troyansky

www.masterssummit.com

www.naturalsynergies.com

 



View solution in original post

2 Replies
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Try swapping the two Identifiers:

Sum({BM08 * $<[Fiscal Year]={'$(FiscalCurrentYear)'},Month={$(=Month(Today()))}}>}[Sales Amount])


The logic being: you are trying to replace Year and Month in the current selections, not in your bookmark. Keep in mind that the modifiers apply to each ID, not to both of them together. The generic syntax is:


ID1 <Modifiers> * ID2 <Modifiers>


In your case, ID1 = BM08, with no modifiers

ID2 = $ (Current selections), withe the Modifiers for year and Month.


best,


Oleg Troyansky

www.masterssummit.com

www.naturalsynergies.com

 



Not applicable
Author

That was indeed my issue! Thank you for the explanation along with the answer. I've not seen it explained that way and it makes much more sense now.

Thank you for your time and expertise!