I need some clarification regarding the creation of Visualizations. I have a need to create 1 to N number of Visualizations. Is it possible to dynamically create visuals via code (or some other method) based on some sort of input (I have a need to produce a different number of charts dependant on which client I am viewing the chart from) or am I limited to dragging and dropping on Visualizations onto a report manually at design time?
Ideally I'd like to be able to run some sort of query and then create charts based off this result set. Is this possible?
If you're talking about custom visualizations...
Your best bet is probably to create a custom visualization that has all the options and features to adapt to varying input.
If you're talking about reports...
I don't think generating PowerBI reports with code is really (intended to be) easily done. I recommend trying either creating several different "smart" but hardcoded reports that adapt to the data, and choose between them dynamically, or switching to another technology to do this.
Related
We have come to the situation of wanting to rename some columns in our PowerBI reports for clarity reasons and also replace some raw numbers with measures, so we can add logic to them. However renaming fields breaks the visuals in reports in the PowerBI service that have been created based on the dataset.
Fixing all the visuals by hand is absolutly not feasible for us, as we have hundereds of reports with dozens of visuals each, over multiple datasets. Is there any way to solve this, maybe edit the deployed reports programmatically somehow or are we just stuck with the field naming and layout we chose?
Thanks for any help!
We found a solution to this, while it might not be a straightforward process, it allows to programmatically alter reports and fix them in JSON format. The command line toolset pbi-tools allows to decompile and recompile reports like
pbi-tools extract reportfile.pbix
pbi-tools compile reportfolder
and create a series of editable JSON files. In our tests it was even possible to substitute a data model with this approach. Also this is useful for version control of reports.
Credit to AlexisOlson on the PowerBI forum.
Fixing all the visuals by hand is absolutly not feasible for us, as we have hundereds of reports with dozens of visuals each, over multiple datasets.
The only general solution to breaking changes in a shared Dataset is to introduce a new version, and keep both for a period of time.
For this specific change, you could introduce a new Perspective in the model (using Tabular Editor) which new reports could choose.
Another option if the Dataset is large, and you don't introduce any structural changes, is to have one model reference the other model using DirectQuery, which is currently a preview feature.
I wanted to see the Item Level or Granular level data. I know that it can be seen using the drill-through functionality and have tried it. However, I wanted to know whether there is a way I can get it done using Only 1 click. Can it be done?
Yes, just pull the data at the level you want.
I have been trying to customize Superset as much as possible and have succeeded to some extent. What I want to do now is create a custom chart based on my requirements, I have combined two big numbers to look like this using CSS properties but it's interfering with a lot of other properties of the charts in a given dashboard.
This is nothing but a set of two "big number" chart combined together with custom CSS. What I want to achieve is a customized widget having some special design or formatting. In simpler words to achieve the same below but with some word in between like:
30% Budget is providing me 70% output. Has anyone tried any hack to do that?
as an update, recently Preset has released a tutorial of just how to do that. Basically with the new viz plugin architecture you can use any js library and do any customization you want, and integrate it to Superset. They also talked about the new architecture and did a live demo, the video is here.
Yes, you can create a custom chart in Superset.
You can follow some existing chart additions for example:
https://github.com/apache/incubator-superset/pull/3013
to see how a new chart is developed and integrated in superset.
I have been tasked to create a crystal report that includes non linked subreports. It is meant to replicate the following. I am just having a hard time wrapping my mind around where to begin.
My application consumes a webservice which returns a list of objects for each web query made. I figured that since crystal reports tends to work natively with datasets, that I would create a custom dataset containing all the tables that the queries would involve.
Now that I have created a dataset and the data is loaded from the webservice I am consuming, I have come to a point where I am attempting to figure out how to query the dataset in such a way as to join columns from each datatable and build the report from that query.
Now can someone tell me whether there is an easier way to do this or have any suggestions as to what route they might take to accomplish this? The report needs to include subreports which complicates it a bit more.
I've found that it is cleaner and easier to maintain if you write a stored procedure in your database, and then just use that as your source in Crystal. If you have multiple sets of data to report, use multiple stored procedures. If you're going to have multiple subreports, it helps to have a common set of parameters for the procedures, although that is not required.
By getting your data using stored procedures, you can verify that you're getting the correct data before you write the report. Then Crystal is used mostly for formatting and totalling.
Trying to build a simple like system in modx (which uses php snippets of code) I just need a button that logged in users can press which adds a 'like' to a resource.
Would it be best to update a custom table or TV? my thoughts are that if it is a template variable i can use getResource to sort by amount of likes.
Any thoughts on the best way to approach this or how to build this would help. My php knowledge is limited.
Depends how you are going to use it after and if you are storing more data than just a 'like' count. TV's are expensive on resources [even more so if you are going to whip through the entire resource set with getResources] so if you are going to do a lot of processing after the fact I would either look at a custom table ~or~ explore using property sets on your pages [I think it should be pretty easy to write a plugin that will update a page property]
I'd definitely go for a custom table.
While you could simply increment a numeric TV to count the amount of likes, you will come to a situation where anyone may be able to keep on liking a resource without limit - while you didn't specify the exact concept, that hardly can be desired. Using a custom table you could throw in a relational alias to the user ID that liked the resource, add a timestamp so you know when it happened, and let your fantasy run wild on additional features that are now open to you.
While not a hard requirement for custom tables, you will probably want to take the time to learn xPDO, which is the database abstraction layer MODX is based on. There's a great tutorial on the RTFM which walks you through it.