How to Calculate a Day and Today?
Answers
-
Hi Wahyu Nugraha,
did you already look here: How can I calculate difference between two dates?
Kind Regards,
Helmut
0 -
Hi,
That is different, i want dataview show like this
if day < today i want to get data from cube actual packing else aggr planning. but it shown wrong.
and my layout like this
are "Day" as entity cannot compare with "Today" as cube?
0 -
Hi Wahyu,
it doesn't seem as if your cube "Actual Packing" contains any data--at least the dataview doesn't show anything...
Do you have actual figures for "today()"?
The column "Day" (the entity) is set to display in what way (Code/Desc/Code&Desc)?
Kind Regards,
Helmut
0 -
Hi,
Entity "Day" is a string (like every other Entity), so comparing it with a date doestn lead to a result. But you can create a date cube (based on Day) which contains the date, or you can use nexel for transforming the Day-String to a Day-Date
regards
Björn
1 -
Hi Wahyu Nugraha,
In your latest screenshot is "today" a cube. In the first one "today()" was an algorithm. As seen here Column Algorithm
BR, Ray
0 -
The dataview should be shown aggr planning.
"Today" is Cube date which is run by procedure. its like today().
"Day" as entity is set display by Code.
0 -
It shown when i change "day" as code and today as column algorithm is running, but logical its wrong.
exmple: 24/08/2018 compare 25/07/2018, board shown actual packing.
it should be on logical if(d<e,c,b) must show aggr planning. because d<e is false.
0 -
0
-
HI,
I also try create date cube with contains the date with running procedure. but it shown blank.
0 -
You can create a cube that contains a number per day within your dates (i call it counter cube), this can be fairly easy to do with NEXEL writeback fuction in a process, Then by adding or subtracting you can always move forward or backwards from that counter. At the same time it allows to have comparisons, if (Date = date where i am ; counter ; 0). Giving me when there is a match within dates. In the example below i have found out that my start date corresponds to counter 146. If i add 2 days, i go to 148 which would be the 25.07.18 2 days more than the 23.07.18.
Cool thing about this solution, you can modify the nexel (as in my example) at will and include for example working days, holidays, or other calendar specific things you with to do. This will modify the counter allowing you to move 2 working days forward for example.
4 -
*you wish to do
0