Convert tableau DATE_TRUNC to SQL query

Bala Narasimha Challa 466 Reputation points
2020-09-30T03:59:48.657+00:00

Hi Team,
Have one calculated filed in tableau like bellow i want to convert to sql query please help on

CEILING(COUNTD([RefId])/COUNTD(DATETRUNC('week',[OrderTime],'monday')))

SQL Server Other
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. m 4,276 Reputation points
    2020-09-30T05:14:25.033+00:00

    Hi @balanarasimhac-1459 ,

    Tableau Desktop does not support the Microsoft SQL Server TIME data type. Fields of this data type are not imported and do not appear in Tableau Desktop. If included in stored procedures, TIME data type fields will not appear in Tableau Desktop. For more information, see Use a Stored Procedure.

    However I am not familiar with Tableau, you can keep this case open, and maybe others can help you.

    BR,
    Mia


    If the answer is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments

  2. m 4,276 Reputation points
    2020-10-06T01:34:25.293+00:00

    Hi @Bala Narasimha Challa ,

    Is the reply helpful?

    BR,
    Mia


    If the answer is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.