Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
has75042
Creator
Creator

Set Analysis Condition

=sum({$<fiscal_period = {1} >}Credit_Begining + Debit_Beginning) *CBS_Rpt_Factor

I don't want above set analysis to change if user select period 2. What I want is to show only Period 1 numbers all the time. 

so for example if user select 2, the numbers should not change. It would still show period 1 number

Please let me know how can I achieve it. 

 

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Perhaps like this:

=sum({$<fiscal_period = {1} >}Credit_Begining + Debit_Beginning) *Max({$<fiscal_period = {1} >}CBS_Rpt_Factor)


talk is cheap, supply exceeds demand

View solution in original post

6 Replies
Prashant_Naik
Partner - Creator II
Partner - Creator II

Hi,

Below expression might help

(sum({<fiscal_period = {1} >}Credit_Begining ) +sum({<fiscal_period = {1} >}Debit_Beginning) )*CBS_Rpt_Factor

I considered Credit_Begining + Debit_Beginning are 2 different fields

Regards,

Prashant

has75042
Creator
Creator
Author

Hey Prashant,

 

Thanks for your reply. The number are still changing.

We just want to show last year period 1 numbers, regardless of what period users pick. Somehow is there a way to freeze it. 

haupenthals
Contributor III
Contributor III

Maybe CBS_Rpt_Factor is changing depending from the Fiscal Period?

Please try below:

(sum({<fiscal_period = {1} >}Credit_Begining ) +sum({<fiscal_period = {1} >}Debit_Beginning) )*sum({<fiscal_period = {1} Distinct CBS_Rpt_Factor)

Gysbert_Wassenaar

Perhaps like this:

=sum({$<fiscal_period = {1} >}Credit_Begining + Debit_Beginning) *Max({$<fiscal_period = {1} >}CBS_Rpt_Factor)


talk is cheap, supply exceeds demand
has75042
Creator
Creator
Author

=sum({$<fiscal_period = {1} >}Credit_Begining + Debit_Beginning) *Max({$<fiscal_period = {1} >}CBS_Rpt_Factor)

Thank you so much. The above set analysis is working. 

 

Can you please explain me the reason behind max function?

Gysbert_Wassenaar

Max will pick the mack CBS_Rpt_Factor value in case there is more than one value. I have no idea if that's the correct value.

If there is always only one value then Only() should work too. But if max works and only doesn't then there are several CSB_Rpt_Factor values and you need to decide which one to use. Perhaps that's the maximum value, but may you should use the minimum value or the average the values.


talk is cheap, supply exceeds demand