While you work on real-world tasks in energy BI, you’ll most likely have totally different environments Like DEV, UAT, Pre-Prod and Prod. It can be crucial for you and your viewers to know what the info 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 atmosphere. You’ll have requested or been requested with a query like “The place the info is coming from?”. You will need to understand how reliable the info you’re analysing is. On this publish I present you a simple solution to present the atmosphere your Energy BI report is related to.
How It Works
To show the atmosphere title you employ question parameters, you then reference that parameter, flip it to a desk and add columns to indicate the environments accordingly. Straightforward proper?
Relying in your state of affairs the implementation could be barely totally different, however the principals are the identical. On this publish I take advantage of a SQL server database. Subsequently I must Parameterise server title. in actual world you may additionally must parameterise the database title. Once more, in case your case is kind of totally different, like in case you get knowledge from Excel, then the Excel path could be totally 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 “Kind”
- Choose “Checklist of values” in “Recommended Values” and sort in server names for various environments
- choose a “Default Worth” and “Present Worth”
- Click on OK
Up to now you created a brand new parameter that can be utilized to get knowledge from a SQL Server knowledge supply.The subsequent steps present you easy methods to use that parameter to indicate the environments in your studies.
- Proper click on on the “Servers” parameter and choose “Reference”
- This creates a brand new question referencing the parameter’s “Present Worth”
- Rename the question to Environments
- Click on “To Desk” button from “Convert” part from the ribbon
- Rename the “Column1” column to “Server”
- from “Add Column” tab from the ribbon click on “Customized Column”
- Kind in a reputation for the brand new column
- within the components kind one thing the next (the components could be totally different in your case)
if [Server] = ".SQL2017" then "" else if [Server] = ".SQL2019" then "UAT" else "Dev"
- Click on OK
I don’t wish to present something after I change to manufacturing server so I put “null” for my manufacturing server.
We’re virtually accomplished. The one remaining piece of the puzzle could be making use of the adjustments and put the atmosphere in a Card visible in our report.
- Click on “Shut & Apply” from “Residence” tab from the ribbon
- Now put a Card visible on the report canvas
- Choose “Atmosphere” column
- Disable “Class Label” from the Card
Now let’s check it.
- From “Edit Queries” button from “Residence” tab click on “Edit Parameters”
- Change parameter worth by deciding on a distinct worth from the checklist
- Click on OK
- Click on “Apply Modifications”
There we go. It’s working completely.
Here’s a screenshot of a report constructed with the identical method that clearly exhibits the atmosphere the report is related to. After I choose a manufacturing server then the cardboard exhibits nothing so it’s could be invisible in manufacturing atmosphere whereas in different environments it’s fairly clear which atmosphere my report is related to.
Have you ever ever used this method? Have you ever confronted any challenges? Have you ever accomplished it in a different way? Please share with us your ideas within the remark part under.