Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
AlB
Super User
Super User

Visual simultaneous events

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      

 

AlB_2-1644697554677.png

 

 

 

12 REPLIES 12
AlB
Super User
Super User

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:

  • Specifying fields and the display order for the tooltip. Note that a "format" is also needed to get the the datetime values to show in full
  • Specify a different "color" for the "mark" or using the User field in "encoding" (two different tabs; not sure which one you wanted)
  • Sorting by a field. I didn't see an additional field, so I sorted by User descending to demonstrate the syntax.

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI 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)

Overview | Vega-Lite

 

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


AlB
Super User
Super User

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.

 

mahoneypat_0-1645138464558.png

{
"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





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


mahoneypat
Employee
Employee

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

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


TomMartens
Super User
Super User

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



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany
AlB
Super User
Super User

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?

Greg_Deckler_0-1645117016113.png

 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.

 

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

AllisonKennedy
Super User
Super User

@AlB  Timeline Storyteller might get you close? https://excelwithallison.blogspot.com/2021/06/custom-visual-review-happy-fathers-day.html 


Please @mention me in your reply if you want a response.

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.