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

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

today()-1 Problem

In set analysis Today()-1 creating problem

Explanation:

Monday-1=Sunday

But i want to display Monday-1=Friday

Networkdays

How to achieve this using set analysis

6 Replies
PrashantSangle

Hi,

try with if

if(weekday(datefield())='Monday',datefield-2,datefield-1)

Regards

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 🙂
sunny_talwar

On similar lines for what max dreamer just gave you but I feel that there should be datefield-3 if the condition is met. Here is what I have:

=If(WeekDay(Today()) = 'Mon', WeekDay(Today()-3), WeekDay(Today()-1))

Best,

S

Anonymous
Not applicable
Author

if you want always 1 work day before actual day you can use

=firstworkday(today(),1)  -> results in friday if today is monday

you can even include Holidays (as 3rd Parameter) in the calculation

leandro_gocosta
Contributor III
Contributor III

Hi,

use =date(Today()-1)

leandro_gocosta
Contributor III
Contributor III

Exemple:

Sum({<DATE = {'$(=Date(Today() - 1))'}  Sales )

lucianosv
Specialist
Specialist

Boa tarde.

Já tentou coloca o 1 na expressão para forçar a condição?

Da maneira que está se today - 1 não estiver na seleção não vai funcionar

Enviado do meu iPhone

Em 20/04/2015, às 13:45, Leandro Gonçalves <qcwebmaster@qlikview.com> escreveu:

Qlik Community

today()-1 Problem

resposta de Leandro Gonçalves em App Development - Visualize a discussão completa

Exemple:

Sum({<DATE = {'$(=Date(Today() - 1))'} Sales )

Responda a esta mensagem respondendo a este e-mail ou vá para a mensagem em Qlik Community

Inicie uma nova discussão em App Development por e-mail ou em Qlik Community

Seguindo Leandro Gonçalves nestes fluxos: Fluxo de conexões