I am trying to create a time table to make a filter range between 0 and 23 hs. This would be my first question but I can't even create any table because of the syntax error. (I don't remember how to do this). I am using Power BI Desktop and this is the DAX calculated table syntax:
DateTime =
ADDCOLUMNS (
CROSSJOIN(
CALENDAR(DATE(2000;1;1);DATE(2025;12;31));
UNION (
ROW ( "Time"; TIME ( 1; 0; 0 ) );
ROW ( "Time"; TIME ( 2; 0; 0 ) );
ROW ( "Time"; TIME ( 3; 0; 0 ) );
ROW ( "Time"; TIME ( 4; 0; 0 ) );
ROW ( "Time"; TIME ( 5; 0; 0 ) );
ROW ( "Time"; TIME ( 6; 0; 0 ) );
ROW ( "Time"; TIME ( 7; 0; 0 ) );
ROW ( "Time"; TIME ( 9; 0; 0 ) );
ROW ( "Time"; TIME ( 10; 0; 0 ) );
ROW ( "Time"; TIME ( 11; 0; 0 ) );
ROW ( "Time"; TIME ( 12; 0; 0 ) );
ROW ( "Time"; TIME ( 13; 0; 0 ) );
ROW ( "Time"; TIME ( 14; 0; 0 ) );
ROW ( "Time"; TIME ( 15; 0; 0 ) );
ROW ( "Time"; TIME ( 16; 0; 0 ) );
ROW ( "Time"; TIME ( 17; 0; 0 ) );
ROW ( "Time"; TIME ( 18; 0; 0 ) );
ROW ( "Time"; TIME ( 19; 0; 0 ) );
ROW ( "Time"; TIME ( 20; 0; 0 ) );
ROW ( "Time"; TIME ( 21; 0; 0 ) );
ROW ( "Time"; TIME ( 22; 0; 0 ) );
ROW ( "Time"; TIME ( 23; 0; 0 ) );
ROW ( "Time"; TIME ( 24; 0; 0 ) )
)
);
"DateTime"; [Date] + [Time];
"Hour"; HOUR ( [Time] )
)
This gives me syntax error on ; (I've tried "," either). There is some easy stuff that I writing it wrongly I am pretty sure, where is the error / errors? Thanks
I tried with this code (pasted from Internet) and this don't work:
DATET= CALENDAR (DATE (2017, 1, 1), DATE (2017, 12, 31))
;
with,
.