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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
ryanfoster84
Creator
Creator

Qlikview Selection

Hi,

i was wondering if someone could help i have the following piece of code

=If([Revenue Adjustment] = 0, 'Revenue Adjustments Not Included', 'Revenue Adjustments Included Up Through'& ' ' & Max([Year Month]))

so when the user select a month it will say if the adjustments have been loaded or not but i need to to say only the latest month which has been selected regardless of month selection can anyone assist. currently when you select a month it will say that month.

cheers,

ryan

12 Replies
sunny_talwar

Try this:

=If([Revenue Adjustment] = 0, 'Revenue Adjustments Not Included', 'Revenue Adjustments Included Up Through'& ' ' & Max({1} [Year Month]))


or


=If([Revenue Adjustment] = 0, 'Revenue Adjustments Not Included', 'Revenue Adjustments Included Up Through'& ' ' & Max({<MonthField>}[Year Month]))

First one won't change the Max([Year Month]) based on any selections you make in you data base, it will always show the Max. Second one just won't change based on selection in your MonthField. If for instance you make selection in YearField or another field such as Product, it will change. So based on your requirement you can decide which one better suits your needs.

Best,

Sunny

ryanfoster84
Creator
Creator
Author

hi thanks for that but unfortunately that is not what i am looking,

basically i need it to say the the latest month that has adjustments loaded. so if i make a date selection of September 2015 but there are adjustments loaded until November 2015 it will say Revenue Adjustments Included Up Through Nov 2015.

sunny_talwar

I believe that is what we are doing, right? We are trying to ignore selections made in the date field to always show the maximum date where revenue adjustments were made.

If I am still not thinking it right, would you be able to share a small sample?

ryanfoster84
Creator
Creator
Author

sadly i can't share the app as it contains customer data but here is a screen shot

2015-12-06_14-16-23.png

it says 201509 but i need it to say October 2015 as this was the latest month to have adjustments.so currently at the minute we are i December and the adjustments for November will be loaded in the middle of the month. so once they are loaded it will then say Nov 15

ryanfoster84
Creator
Creator
Author

also

=If([Revenue Adjustment] = 0, 'Revenue Adjustments Not Included', 'Revenue Adjustments Included Up Through'& ' ' & Max({1} [Year Month]))


this is returning 201512 as its the max date in the date regardless of selection but i need it to bring 201510 as it is the latest month to adjustments but that will change once Novembers are loaded in the middle of December.

the second formula is just bring back the year month that you select

sunny_talwar

See if the attached sample makes sense:

Capture.PNG

ryanfoster84
Creator
Creator
Author

i see what you are doing and tried the following formula:

=If([Revenue Adjustment] = 0, 'Revenue Adjustments Not Included', 'Revenue Adjustments Included Up Through'& ' ' & MonthName(Max({1<[Revenue Adjustment] = {'*?'}>}[Year Month])))

but still didn't work

Testt.png

table.png

would it be because there are multiple values for 31/10/15.

appreciate the help

sunny_talwar

That should have not made any difference, because in the attached sample, I added another date for 10/03/2015 and still seems to work.

ryanfoster84
Creator
Creator
Author

yeah no luck at all very annoying