03-20-2017 02:25 PM - edited 03-20-2017 02:26 PM
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:
- I can't sort a graph by the value of the category (in this case sort event ascending by number of seconds).
- I can't display a calculated/formatted label (i.e. chart based on number of seconds but display hh:mm:ss)
- There aren't any sorting options with this chart (i.e. filter by occurrence date or event number)
- 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.
Solved! Go to Solution.
03-23-2017 03:08 AM
03-21-2017 08:06 PM - edited 03-21-2017 08:10 PM
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.
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 )
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.
03-22-2017 12:15 PM - edited 03-22-2017 12:50 PM
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.)
03-23-2017 03:08 AM
03-24-2017 03:47 PM
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.