Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi all,
We want to have a visual similar to the one below so that we can see where users were active simultaneously. Each row on the y axis is a different user, the x axis is time and the yellow bars show the time period(s) on which a user was active in the system.
Can you recommend a visual capable of this?
Note we will need a slicer on datetime (x-axis) to allow the user to concentrate on a specific period
Thanks
Thanks @mahoneypat
That gets me pretty close. I was playing with it and would need to change a couple of things that i haven't been able to:
1. Change the color of the bars
2. Can the visual be sorted by one of its fields?
3. I have a tooltip now but would like it to show User first instead of after StartTime. Can that be changed?
I'm attaching a pbix with your Vega code in a Deneb visual and the events data
Thanks a lot
Please see the attached that addresses:
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
@mahoneypat Very useful, thanks for letting me discovering this visual, literally saved my day!
Do you know if is it possible to remove completely the legend?
Do you have further documentation about it?
Thanks in advance
Bruno
Here are two great links to get started with the Deneb visual, which leverages Vega Lite. The second link has all the documentation for Vega Lite where you can see the properties for a legend and how to disable it.
Declarative Visualization in Power BI | Deneb (deneb-viz.github.io)
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Thanks @Pragati11 @Greg_Deckler @TomMartens
@mahoneypat thanks for the offer. I'm attaching some sample data with the start and end times for the events per user. Users timelines should be depicted one above the other along the y axis as in the pic on my initial post.
Thanks a lot
I missed that you had start/end times, so used a "rect" mark instead (so an "x2" value could be provided). How does this look? If it works, the "spec" is below that you can copy/paste into your Deneb visual. There is a lot more you can do with the formatting of course.
{
"data": {"name": "dataset"},
"mark": {"type": "rect"},
"encoding": {
"y": {
"field": "User",
"type": "nominal",
"axis": {"title": null}
},
"x": {
"field": "StartDateTime",
"type": "temporal",
"axis": {"title": "DateTime"}
},
"x2": {"field": "EndDateTime"}
}
}
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
I agree with @TomMartens . Deneb can be used for this one with the "tick" "mark". I am glad to try it out, if you provide some sample data.
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Hey @AlB ,
currently I'm considering each data visualization task being a nail and deneb the hammer:
https://deneb-viz.github.io/
Maybe these examples provide you with an idea what can be done
I cosnider deneb or being more precise vega and vega-lite on par with seaborn and ggplot2 (maybe not fully on par) but deneb bring the interactivit to the table that r and python charts are completely missing.
Hopefully this provides some ideas.
Regards,
Tom
Thanks very much @AllisonKennedy
That doesn't seem to do what we need.
Any other ideas?
@MFelix @Greg_Deckler @mahoneypat @TomMartens @parry2k @lbendlin @Pragati11
@AlB How about Craydec Timelines?
Hi @AlB ,
Just wanted to understand why the solution from @AllisonKennedy doesn't work?
Have you tried checking Python/R route for this? Something like this:
https://towardsdatascience.com/advanced-plots-in-matplotlib-part-2-e88f91ce9e31
I haven't tried this though.
@AlB Timeline Storyteller might get you close? https://excelwithallison.blogspot.com/2021/06/custom-visual-review-happy-fathers-day.html
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
80 | |
64 | |
57 |
User | Count |
---|---|
145 | |
110 | |
91 | |
84 | |
66 |