Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

SET ANALYSIS WITH DATES NOT WORKING

CAN SOMEONE PLEASE HELP ME.  I AM NOW AT A POINT WHERE I WANT TO BREAK MY COMPUTER LOL.

WHY DOESNT THIS WANT TO WORK CORRECTLY:

sum( {$<DATE = {'>=$(=weekstart(max(DATE)))<=$(=max(DATE))'}>} timeworked )

IT STILL PULLS ALL THE DATA AND NOT ONLY THIS WEEKS DATA...

i EVEN TRIED ADDING THE NUM() FUNCTION, DOENST WORK EITHER

17 Replies
Not applicable
Author

I have realised that the issue is the MAX function.  It gives an error, any ideas why?

Not applicable
Author

Carel,

please check in your expression editor if DATE is highlighted red or blue. If it's blue QV is not recognizing DATE as a field name but as a function.

Not applicable
Author

How you are saying there is a problem with max function.

can you explain briefly and if u can able to attach sample file will be useful to find the issue.

Not applicable
Author

Hi,

I attached the model,

Thanks

Not applicable
Author

try the following expression,

=sum({<DATE={">=$(=date(weekstart(max(DATE)),'YYYY/MM/DD')) <=$(=date(max(DATE),'YYYY/MM/DD'))"}>}timeworked)

there is no data for 30th sep 2013.

select the date 18th sep, or select aug month or select any month where u have the data.

Gysbert_Wassenaar

To begin with the max Date is 30/09/2013 and there's no data for that date. If you select for example 18/09/2013 there is data. But you need to specify the date format YYYY/MM/DD. See attached qvw.


talk is cheap, supply exceeds demand
Not applicable
Author

Hey Carel,

the following formula works in your app.

=sum({<date={'>$(=(floor(num(max(DATE))))-7)'}>}timeworked)

Not applicable
Author

Thanks everyone, sorted