Forum Discussion
How to retrieve js Date from a date column in DataViewTable
- 5 years ago
Your hierarchy isn't visible in your screenshot's fields pane, but at a guess, your hierarchy in the visual contains levels for Year, Quarter and Month, but not the actual date?
If so, you would need to ensure that this is included. If you're using auto date/time, then you could change the hierarchy to use the underlying date column instead in the visual.
If your supplied column is a date/time, according to the data model, then your type will flag accordingly, e.g.:
Do you get the same output in a table visual? I've set up a similar hierarchy and this is what I get (which is what I'd expect):
If you add and actual Date column to your hierarchy then the column and type should be visible, e.g.:.
This is always a good test if you're using the table data view mapping - it it doesn't look right here, it won't look right in your visual's data view.
Also, you can't guarantee that your end users will be using a date hierarchy; most will put in a raw date. I'm not sure if this is an important requirement for your visual but you will need to ensure to specify this in any documentation for your end users if so.
Daniel
Hi Anonymous ,
Maybe you can refer to the link.
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.