Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
tatsuya0127
Contributor II
Contributor II

Change the Value used for each month

tatsuya0127_0-1642197600286.png

I want to reclassify the annual estimated value according to the selected month, but if I control it with the IF statement, only the selected month is displayed.
I would like to know how to display all the months of the year even if you select a certain month.
 

 

Labels (2)
3 Solutions

Accepted Solutions
Digvijay_Singh

To show all the months even if you select a month, you need to disregard the month field in your set analysis expression in the measure, the syntax is like this - {<Month=>}

View solution in original post

Digvijay_Singh

I know these situations are tricky when if stmt and setanalysis come together. IF actually try to evaluates data row by row but set analysis consider the whole data model together.

If possible try to modify your statement something like this, not sure though - 

Sum({<Country=>}Quantity)/Sum({<Country=>} if(Country='Germany',1000,1))

If it doesn't work, please share a sample app and the expected output, something like this will work I believe

Thanks,

View solution in original post

PrashantSangle

Please select the post as solution and close the thread.

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

View solution in original post

7 Replies
Digvijay_Singh

To show all the months even if you select a month, you need to disregard the month field in your set analysis expression in the measure, the syntax is like this - {<Month=>}

tatsuya0127
Contributor II
Contributor II
Author

Thank you for your reply.

I do what you pointed out, but it doesn't work.

Below is the IF statement.

=if(tmpmonth>10,
rangesum(above(Sum({$<Billing_Year={$(tmpYear)},[tmpmonth]=,[tmpquater]=>}AOPGross),0,rowno())),


if(tmpmonth>1,
rangesum(above(Sum({$<Billing_Year={$(tmpYear)},[tmpmonth]=,[tmpquater]=>}AOPGross),0,rowno()))/1000000,
0))

Digvijay_Singh

I know these situations are tricky when if stmt and setanalysis come together. IF actually try to evaluates data row by row but set analysis consider the whole data model together.

If possible try to modify your statement something like this, not sure though - 

Sum({<Country=>}Quantity)/Sum({<Country=>} if(Country='Germany',1000,1))

If it doesn't work, please share a sample app and the expected output, something like this will work I believe

Thanks,

PrashantSangle

Hi @tatsuya0127 ,

 

can you explain you query with sample data and expected output.

So that it will helps to provide correct solution, rather than guessing.

 

Regards,

Prashant Sangle

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
tatsuya0127
Contributor II
Contributor II
Author

Thank you for your reply.

The problem was solved by changing the axis to be compared.

tmpmonth  = 1,2,3,4,5,6,7,8,9,10,11,12

Billing_month=202201,202202,202203...202212

 

I compared "tmpmonth" with the target month and it didn't work.

I was able to control it by using a Right function for "Billing_month".

 

before:  if(tmpmonth>10,A,B)

after:if(right(Billing_month,2)*1>10,A,B) --> OK

 

It seems I didn't understand the concept of the comparison axis.

 

Thanks,

 

 

 

 

 

 

tatsuya0127
Contributor II
Contributor II
Author

Thank you for your reply.

 

The problem was solved by changing the axis to be compared.

 

If I have any questions next time, thank you again.

 

Regards,

PrashantSangle

Please select the post as solution and close the thread.

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂