I have SQL table with datetime information of room booking
and I need show graphical representation this data in PowerBI for example as this:
Is it possible and how? If not what I can use to get similar results?
Thank you for all answers.
CodePudding user response:
You can use Deneb custom visual for this (certified and free):
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"description": "A simple bar chart with ranged data (aka Gantt Chart).",
"data": {"name": "dataset"},
"mark": "bar",
"encoding": {
"y": {"field": "task", "type": "ordinal"},
"x": {"field": "start", "type": "quantitative"},
"x2": {"field": "end"}
}
}
works fine
but If I try use datetime values table
with same code
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"description": "A simple bar chart with ranged data (aka Gantt Chart).",
"data": {"name": "dataset"},
"mark": "bar",
"encoding": {
"y": {"field": "task", "type": "ordinal"},
"x": {"field": "start", "type": "quantitative"},
"x2": {"field": "end"}
}
}
data not shown in graph :(
What is wrong ? I have idea to transfer datetime values to decimal number but this is very bad workaround. Thank for any help.