Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need to create a calculated field with a False True statement
If monthY < monthX = True else False
I am currently using not date fields but 201910 202002 in numbers
But also datafields: 01-02-2020 and 31-7-2019
What is the expression for this calculated field for both numbers and dates?
if i understood correctly :
=if(ValueX > ValueY,'True','Fals')
hi
it doesn't matter if you use numbers or dates
because dates are numbers in different format
so the if statement will work both for numbers and dates
Hi @lironbaram
Thanks for the note
But what is the expression for an if statement in Qliksense? For a Date: e.g if MonthY<MonthX return 1 (or True) and if MonthY>MonthX return 0 (or False)
But also for a measure like this:
Sum([CM Hour.]) Count(Calls) if CMHour<Calls return 1 (or True) and if CMHour>Calls return 0 (or False)
Maye be :
if(alt(date#( monthY , 'DD-MM-YYYY' ),date#( monthY , 'YYYYMM' ))<alt(date#( monthX , 'DD-MM-YYYY' ),date#( monthX , 'YYYYMM' )),'True','False')
Thanks @Taoufiq_Zarra will try this one out
And what if you are comparing normal numbers
If ValueX > ValueY True and if ValueX < ValueY False
if i understood correctly :
=if(ValueX > ValueY,'True','Fals')
This one works thanks! I will try out the date if statement expression tomorrow