Home Business Intelligence Good Practices: All the time Show the Reporting Atmosphere

Good Practices: All the time Show the Reporting Atmosphere

0
Good Practices: All the time Show the Reporting Atmosphere

[ad_1]

Good Practice: Always Display the Reporting Environment

Once you work on real-world initiatives in energy BI, you’ll in all probability have completely different environments Like DEV, UAT, Pre-Prod and Prod. It is necessary for you and your viewers to know what the information is coming from. Am I taking a look at Dev or UAT knowledge or I’m truly taking a look at actual knowledge in Manufacturing surroundings. You will have requested or been requested with a query like “The place the information is coming from?”. It is very important understand how reliable the information you’re analysing is. On this put up I present you a straightforward approach to present the surroundings your Energy BI report is linked to.

How It Works

To show the surroundings title you employ question parameters, you then reference that parameter, flip it to a desk and add columns to indicate the environments accordingly. Simple proper?

Learn extra about question parameters from an inventory output right here.

Relying in your situation the implementation is likely to be barely completely different, however the principals are the identical. On this put up I take advantage of a SQL server database. Due to this fact I have to Parameterise server title. in actual world you might also have to parameterise the database title. Once more, in case your case is sort of completely different, like in case you get knowledge from Excel, then the Excel path may be completely different for various environments. Let’s dig-in.

  • Open Question Editor
  • Click on “Handle Parameters”
  • Click on “New”
    • Enter “Title” and “description”
    • Tick “Required”
    • Choose “Textual content” in “Sort”
    • Choose “Checklist of values” in “Advised Values” and kind in server names for various environments
    • decide a “Default Worth” and “Present Worth”
    • Click on OK
Creating new parameter in Power BI Query Editor

Thus far you created a brand new parameter that can be utilized to get knowledge from a SQL Server knowledge supply.The subsequent steps present you how one can use that parameter to indicate the environments in your experiences.

  • Proper click on on the “Servers” parameter and choose “Reference”
Referencing query parameters in Power BI Query Editor
  • This creates a brand new question referencing the parameter’s “Present Worth”
  • Rename the question to Environments
Current Value of a Query Parameter in Power BI Desktop
  • Click on “To Desk” button from “Convert” part from the ribbon
Convert Query Parameter value to table in Power BI
  • Rename the “Column1” column to “Server”
  • from “Add Column” tab from the ribbon click on “Customized Column”
  • Sort in a reputation for the brand new column
  • within the system kind one thing the next (the system is likely to be completely different in your case)
if [Server] = ".SQL2017" then "" else if [Server] = ".SQL2019" then "UAT" else "Dev"
  • Click on OK
Add a new custom column to the query in Power BI Query Editor

I don’t wish to present something after I change to manufacturing server so I put “null” for my manufacturing server.

We’re nearly achieved. The one remaining piece of the puzzle could be making use of the adjustments and put the surroundings in a Card visible in our report.

  • Click on “Shut & Apply” from “House” tab from the ribbon
Apply changes to the query in Query Editor in Power BI
  • Now put a Card visible on the report canvas
  • Choose “Atmosphere” column
  • Disable “Class Label” from the Card

All achieved!

Using Card Visual in Power BI Desktop

Now let’s take a look at it.

  • From “Edit Queries” button from “House” tab click on “Edit Parameters”
Edit prarameters' values in Power BI Desktop
  • Change parameter worth by choosing a unique worth from the checklist
  • Click on OK
Switch parameter value by selecting a different value in Power BI Desktop
  • Click on “Apply Modifications”
Applying changes when editing query parameter value in Power BI Desktop

There we go. It’s working completely.

Changing query parameters value in Power BI Desktop

Here’s a screenshot of a report constructed with the identical approach that clearly reveals the surroundings the report is linked to. Once I choose a manufacturing server then the cardboard reveals nothing so it’s could be invisible in manufacturing surroundings whereas in different environments it’s fairly clear which surroundings my report is linked to.

Displaying Environment in Power BI

Have you ever ever used this method? Have you ever confronted any challenges? Have you ever achieved it in another way? Please share with us your ideas within the remark part beneath.

[ad_2]

LEAVE A REPLY

Please enter your comment!
Please enter your name here