Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm confused about when to use num(floor ()) function and what is the use of this?
let's say I have one sale end date is 20220222 and Receiving end date 20190826. So, if I do the num(floor ()) function with both the date and difference it. It will give me 29396 What does this mean? What is the significance of doing this?
20220222 - 20190826 is 29396
Here you have two numbers, both around 20 million, and you calculate the difference. This is meaningless if the two are dates.
You need to interpret the two as dates before you do anything. I.e.
Date#(Date1,'YYYYMMDD') - Date#(Date2,'YYYYMMDD') as Diff,
See more on https://community.qlik.com/t5/Qlik-Design-Blog/The-Date-Function/ba-p/1463157
The Num() and Floor() do not affect anything - The first formats as a number, the second rounds downwards. But since the subtraction already returns integer numbers, nothing is changed.
Hello,
Maybe someone with more BI experience can provide additional helpful information here. But I was unable to find a significant meaning behind the difference of those 2 numbers.
Either you use the combination of Num(Floor()) functions or not, the result of expression 20220222 - 20190826 will still be: 29396. However, what exactly this number represents, I was unable to find.
Regarding the use of the functions and the combination of both, I would say that you can probably make a use of them in various use case scenarios. Here is an example of how these functions work together:
As you can see:
I hope that this information was helpful. In case I have misunderstood the use case scenario, please elaborate in details by providing additional information. However, if it has helped you resolve the issue, please mark it as accepted solution to give further visibility to other community members.
---
20220222 - 20190826 is 29396
Here you have two numbers, both around 20 million, and you calculate the difference. This is meaningless if the two are dates.
You need to interpret the two as dates before you do anything. I.e.
Date#(Date1,'YYYYMMDD') - Date#(Date2,'YYYYMMDD') as Diff,
See more on https://community.qlik.com/t5/Qlik-Design-Blog/The-Date-Function/ba-p/1463157
The Num() and Floor() do not affect anything - The first formats as a number, the second rounds downwards. But since the subtraction already returns integer numbers, nothing is changed.
Hello,
Maybe someone with more BI experience can provide additional helpful information here. But I was unable to find a significant meaning behind the difference of those 2 numbers.
Either you use the combination of Num(Floor()) functions or not, the result of expression 20220222 - 20190826 will still be: 29396. However, what exactly this number represents, I was unable to find.
Regarding the use of the functions and the combination of both, I would say that you can probably make a use of them in various use case scenarios. Here is an example of how these functions work together:
As you can see:
I hope that this information was helpful. In case I have misunderstood the use case scenario, please elaborate in details by providing additional information. However, if it has helped you resolve the issue, please mark it as accepted solution to give further visibility to other community members.
---