Forum Discussion

abc_777's avatar
abc_777
Solution Specialist
4 years ago
Solved

HI

Hi,

 

I have created the following datetime table

 

DateTime =
ADDCOLUMNS (
CROSSJOIN (
CALENDAR ( DATE ( 2014, 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] )
)
 
then joing this table with Sales table invoiceDT
 

 

then in matrix visual i put invoiceDT into Rows and Quantity measure into values from sales table and 

Time column from above-created DateTime table

 

I got this result, same quantity repeating in each hour and so total is same

 

 

 but the result should be like this. Quantity is changes per per same Hour over hour and so total is also changes

 

 

it's not actually filtering Hour over an hour.

please help me to resolve the issue. 

 

thanks

 

  • abc_777's avatar
    abc_777
    4 years ago

    my invoiceDT column got 12:00:00 hr with the date.

    even I have separate column with TIME with data type also TIme and has time value in it. and i made relationship with it but no luck. so what i should to to resolve

     

    thx

  • please some one help me out. where the issue i am having to resolved this. or can do remote to my my machine and see the issue. 

3 Replies

  • abc_777 , invoiceDT  should also be at the hour level

     

    invoiceDTHout = datevalue([invoiceDT]) + time(hour([invoiceDT]), 0,0)

    • abc_777's avatar
      abc_777
      Solution Specialist

      my invoiceDT column got 12:00:00 hr with the date.

      even I have separate column with TIME with data type also TIme and has time value in it. and i made relationship with it but no luck. so what i should to to resolve

       

      thx

      • abc_777's avatar
        abc_777
        Solution Specialist

        please some one help me out. where the issue i am having to resolved this. or can do remote to my my machine and see the issue.