Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Phara
Contributor III
Contributor III

select the previous month directly

Hello,

I have a dimension called ''Exercice période'' in French which mean Period exercice. I want to systematically select the previous month of the period, as an example, we're in May, I want to select April.

Any expression for that please?

Phara_0-1715366807194.png

 

Thank you so much

 

Labels (2)
1 Solution

Accepted Solutions
Phara
Contributor III
Contributor III
Author

Hello @marksouzacosta 

I'd like an expression with the solution # 1 please

Thanks!

View solution in original post

2 Replies
marksouzacosta

There are different solutions for this problem and the best one depends on how you want your app to behave.

Solution 1

In your Load Script, add a new field called [Previous Period] and calculate it according to the [Period Exercise]. This will create a straight association between your Exercise and Previous periods.

Solution 2

You can calculate the desired Previous Period and use in your measures using Set Analysis. This is very flexible but harder to implement and it does not affect all measures of your dashboard (you'll have to make the same adjustment on every measure that needs the same rules)

Please let us know what looks more like what you are looking for so we can try to figure out the code for that.

Read more at Data Voyagers - datavoyagers.net
Follow me on my LinkedIn | Know IPC Global at ipc-global.com

Phara
Contributor III
Contributor III
Author

Hello @marksouzacosta 

I'd like an expression with the solution # 1 please

Thanks!