Good Practices: All the time Show the Reporting Surroundings

Date:


Good Practice: Always Display the Reporting Environment

Whenever you work on real-world tasks in energy BI, you’d 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 Dev or UAT knowledge or I’m truly actual knowledge in Manufacturing surroundings. You could 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 technique to present the surroundings your Energy BI report is linked to.

How It Works

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

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

Relying in your state of affairs the implementation could be barely completely different, however the principals are the identical. On this put up I exploit a SQL server database. Subsequently I must Parameterise server identify. in actual world you might also must parameterise the database identify. Once more, in case your case is kind 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 “Identify” and “description”
    • Tick “Required”
    • Choose “Textual content” in “Sort”
    • Choose “Record of values” in “Prompt Values” and sort in server names for various environments
    • decide a “Default Worth” and “Present Worth”
    • Click on OK
Creating new parameter in Power BI Query Editor

Up to now you created a brand new parameter that can be utilized to get knowledge from a SQL Server knowledge supply.The following steps present you find out how to use that parameter to point out the environments in your reviews.

  • 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 formulation sort one thing the next (the formulation could 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 need to present something once I swap to manufacturing server so I put “null” for my manufacturing server.

We’re virtually completed. 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 “Surroundings” column
  • Disable “Class Label” from the Card

All completed!

Using Card Visual in Power BI Desktop

Now let’s check 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 distinct worth from the checklist
  • Click on OK
Switch parameter value by selecting a different value in Power BI Desktop
  • Click on “Apply Adjustments”
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 exhibits the surroundings the report is linked to. After I choose a manufacturing server then the cardboard exhibits 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 completed it in a different way? Please share with us your ideas within the remark part under.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Share post:

Subscribe

spot_imgspot_img

Popular

More like this
Related

Girls, It’s Time To Take Management Of Your Cash!

With ladies’s empowerment rising in magnitude, right here’s...

Utilizing AI to Enhance KPIs for Alignment and Readability

Key efficiency indicators (KPIs) are the spine of...