Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Display Message when no data is selected (YTD)

Hi all,

I have a table with an YTD (year to date) expression. This works greate.

But I want to show a message if no date is slected, because in this case the table is empty.

At the moment i use this for calculating my ytd:

sum({<Year = {$(=only(Year))}, Month = {"<=$(=max(Month))"}>} AmountofOrder)

If no date is selected it looks like this:

2015-08-19_14h43_01.png

In this Case I want to display the Message "Please select a Year and Month"

2015-08-19_14h47_37.png

How could I do that?

Many Thanks for your efforts.

Philipp

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Go to the Properties | General tab and enter an expression into the conditional calculation box. Something like:

GetSelectedCount(Year) > 0 And GetSelectedCount(Month) > 0

This will cause a Calculation condition unfulfilled error to appear if there is no Year or no Month (or neither) selected.  Change this error message to a more relevant one by clicking Error Messages, select Calculation condition unfulfilled and type your desired error messge.

If Year and Month are not the correct field names, change the expression above to the correct field names.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

7 Replies
Not applicable
Author

Go to chart general tab then write conditional expression and write the error message what you want

jonathandienst
Partner - Champion III
Partner - Champion III

Go to the Properties | General tab and enter an expression into the conditional calculation box. Something like:

GetSelectedCount(Year) > 0 And GetSelectedCount(Month) > 0

This will cause a Calculation condition unfulfilled error to appear if there is no Year or no Month (or neither) selected.  Change this error message to a more relevant one by clicking Error Messages, select Calculation condition unfulfilled and type your desired error messge.

If Year and Month are not the correct field names, change the expression above to the correct field names.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Ok I understand,

but what is the condition for that, and where and how can I do that... can you please give me more details?!

Anonymous
Not applicable
Author

define in calculation condition like

=if((GetSelectedCount(yourryearfield) > 0) AND (GetSelectedCount(yourmonthfield) > 0),-1,0)

and Change error message  for "calcualation condition unfilled" to "Please select a Year and a Month)

Not applicable
Author

Thank you for the help, but but somehow I do not understand it complete.

This is what I have done:

2015-08-19_15h08_59.png

Then I wrote this:

2015-08-19_15h09_13.png

The name of the Fields is correct, but I do not know what you mean with

Go to the Properties | General tab and enter an expression into the conditional calculation box. Something like:

This will cause a Calculation condition unfulfilled error to appear if there is no Year or no Month (or neither) selected.  Change this error message to a more relevant one by clicking Error Messages, select Calculation condition unfulfilled and type your desired error messge.

Not applicable
Author

My Mistake...

But finally I found it.

Thank you so much!!

2015-08-19_15h30_01.png

jonathandienst
Partner - Champion III
Partner - Champion III

Your earlier post refers:

No, that expression must be entered in the 'Calculation Condition' box from your first screen shot.

Then enter the message that should appear when the condition is not me in the box in the second screen shot. But select the "Calculation condition unfulfilled" standard message before entering your custom message.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein