Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Not applicable

last day - with any selection

Hi all,

I have the following formula in textfield that should give the number of DimensionToCount on the day that is before the selected day (or month):

count(if (InDay (Date, vDateToAnalyse, -1), DimensionToCount))

vDateToAnalyse:  DayName (max(Date), 0)

That returns the correct number if I have no selection. But if I choose another day and want to see the Value of the day before, I get "0" because of the selection. 

I thought something like that could be the solution: count({1}if (InDay (Date, vDateToAnalyse, -1), DimensionToCount))

But that Returns the wrong value. Does anyone have an idea how to solve this problem?

Many thanks in advance

Agathe

Tags (1)
6 Replies
pokassov
Valued Contributor

Re: last day - with any selection

Hello!

Add

vDateToAnalyse:  DayName (max({1}Date), 0)

Not applicable

Re: last day - with any selection

Thanks a lot for your reply.

I tried your suggestion, but that leads to the Problem, that the date is fix to the max date. But in the formula I want to have a variable date in relation to the selection.

Best regards

Agathe

MVP
MVP

Re: last day - with any selection

Try like:

count({<Date={'$(=Date(Max(Date)-1))'}>} DimensionToCount)

If this doesn't work, try to share a samplw qvw.

Not applicable

Re: last day - with any selection

Hi,

sorry for waiting so long, but many thanks to you for your answer.

Unfortunately your Suggestion didn´t work. :-(.

I created an example:

MVP
MVP

Re: last day - with any selection

For last month try:

=count({<Month={'$(=Month(AddMonths(Max(Date),-1)))'}>} Employee)

Not applicable

Re: last day - with any selection

That showed a number in the demo but unfortunately not in my master file. I will try it otherwise but many thanks for your help.

Community Browser