Reply
Frequent Visitor
Posts: 3
Registered: ‎03-20-2017
Accepted Solution

Visualizing quanitites of time

[ Edited ]

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.


Accepted Solutions
Moderator
Posts: 3,393
Registered: ‎03-10-2016

Re: Visualizing quanitites of time

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

View solution in original post


All Replies
Moderator
Posts: 3,393
Registered: ‎03-10-2016

Re: Visualizing quanitites of time

[ Edited ]

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

Frequent Visitor
Posts: 3
Registered: ‎03-20-2017

Re: Visualizing quanitites of time

[ Edited ]

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!

Moderator
Posts: 3,393
Registered: ‎03-10-2016

Re: Visualizing quanitites of time

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

Frequent Visitor
Posts: 3
Registered: ‎03-20-2017

Re: Visualizing quanitites of time

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.