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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
ThingBreaker
Frequent Visitor

Visualizing quanitites of time

Hi All,

I've been bumping into problems developing visualizations for an embedded report.

I'd like to display the distribution of events that have a quantity of time as a value (i.e. Event1, datetime1, 00:05:23; Event2, datetime2, 00:04:50).

I've built a number of these reports in SSRS, but SSRS has several problems embedding in an mvc5+ application (mostly due to authentication architecture)

.

There are a large number of events in a rolling window, so far I've had the best luck representing the value as number of seconds.

My biggest problems so far are:

  1. I can't sort a graph by the value of the category (in this case sort event ascending by number of seconds).
  2. I can't display a calculated/formatted label (i.e. chart based on number of seconds but display hh:mm:ss)
  3. There aren't any sorting options with this chart (i.e. filter by occurrence date or event number)
  4. I can't even begin to figure out how to have it automatically coloured by value (i.e. over x standard deviations crimson)

 

Is this the kind of problem that I'd need to look at custom visuals for? I could hack some values in by putting logic in the query but formatting logic in a query has a bad smell to it.

1 ACCEPTED SOLUTION

Hi @ThingBreaker,

You can change its type of the new column to Time type.
1.PNG

Besides. we are not able to get decompiled default visuals. But you can check if any custom visuals meets your requirement, or you can develop your own custom visual.

Thanks,
Lydia Zhang

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-yuezhe-msft
Employee
Employee

Hi @ThingBreaker,

What type of visual do you create in Power BI Desktop and what fields you use to create the visual? We will appreciate it if you can share us sample data of your table and post screenshot of your scenario.

Firstly, in Power BI Desktop, you can use sort options in the chart to sort your graph. Or you can select your field, then choose “Sort by Column” to sort this field by other field.
1.PNG2.PNG

Secondly, for your second problem, you can consider to create another new column to format the seconds column, then drag  the new column to Tooltips section of your chart. There is a example for your reference.

formatcol = 
RIGHT ( "0" & INT ( Table3[seconds]/ 3600 ), 2 )
    & ":"
    & RIGHT (
        "0"
            & INT ( ( Table3[seconds] - INT (Table3[seconds]/ 3600 ) * 3600 ) / 60 ),
        2
    )
    & ":"
    & RIGHT ( "0" & MOD (Table3[seconds], 3600 ), 2 )

3.PNG

Thirdly, for your last problem, please check if the conditional formatting feature meets your requirement. But please note that this feature is currently only available in table Visual and Matrix visual.

 

Thanks,
Lydia Zhang

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks for your reply Lydia, I'll work on getting some sample data but the model is still being built. I've drastically simplified our requirements. After a revision to our data source I can see the sorting options now. I added custom columns to provide the time in seconds, duration, and text. I see that power M can manupulate durations but it seems that Power BI just handles them as text.

Is there anywhere I can get the decompiled default visuals (i.e. If I'd like to add features to the card visual without rebuilding it from scratch and it'd make learning easier.)

 

Thanks again!

Hi @ThingBreaker,

You can change its type of the new column to Time type.
1.PNG

Besides. we are not able to get decompiled default visuals. But you can check if any custom visuals meets your requirement, or you can develop your own custom visual.

Thanks,
Lydia Zhang

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Just a heads up for anyone else, custom visuals can be "decompiled" by unzipping them. You can't just rezip them because there's extra data around the zipped data. But it will give you all the source. Couldn't find the default visuals and I can't be bothered digging for them in the binaries.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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