Visualize this view – what this mean to developers and end users…?

Hi Folks,

Have you noticed Visualize this view button in in the app bar of any grid view of Dynamics 365?

Here is a dashboard built within couple of minutes. While this can greatly help end users visualize the data present in the system. So, in this post, let’s understand bit more details about this capability and what are the some of the features which are left behind.

Let’s understand the how’s this is generated along with its capabilities and disadvantages compared to traditional Power BI dashboard both from Developer and end user perspective, please note that this is my understanding..

For Developers:

a. Visualize this view uses a PCF Control which calls the Power BI REST API and then generates the embed token for the report embedding that into an Iframe.

b. Then uses Power BI JavaScript API to handle user interactions with the embedded report such as filtering or highlighting data points.

c. When Power BI first generates your report, it takes a look through your data to identify patterns and distributions and pick a couple of fields to use as starting points for creating the initial set of visuals when data is not preselected.

d. Any changes to the data fields calls the UpdateView of the PCF Control and there by passing the updated data fields to REST API and then displays the visuals.

e. Visuals will be created with both selected and non-selected fields which are the related to the selected fields in the data pane.

For End Users & Developers:

Advantages:

  1. Visuals are generated when no data is selected
  2. Cross Highlighting is possible
  3. Click on the Report to see Personalize this visual option
  4. People with Contributor, Member, or Admin role assigned can save the Report to workspace
  5. Users with no access to Power BI cant view this feature, they can request for free Power BI License
  6. Free License users can save the Report to thier personal workspace
  7. Users get build permission when any role above Contributor is assigned and reshare permission is given
  8. The report will be saved as direct query with SSO enabled and honours dataverse settings
  9. Show data table presents a list of tables if the model comprises of multiple tables.
  10. Able to specify the aggregation for each of the field in the model.

Disadvantages:

  1. Only able to export summarized data from Visuals, you will be able to export the data in table from data table.
  2. Only Visual Level, no page level or report level filters
  3. During these reports creation, the model is configured to use Direct Query with Single Sign On.
  4. Embed a report on a Dataverse form requires modifying the XML of the solution
  5. Report published into the workspace are available to download but downloaded reports will not be able to customize further in Power BI Desktop as it would be built using Native Queries.
  6. If the page is kept ideal for long time or the user navigates to other browser window, the session and report will be lost.

Considerations & Limitations:

  1. Power BI Pro license is required to create these reports
  2. While this is wonderful for end users to visualize the data but this is not an alteranative to building reports using Power BI Desktop.

Hope this helps.

Cheers,

PMDY

Using Power-Fx commands in Vs Code Terminal – Preview

Hi Folks,

Looking to improve your experience developing code using Power Fx. Then try this feature which was in preview…I want to show you how you can execute them. It is actually quite ideal for prototyping, debugging, testing to see the Power-Fx expression behavior. If you were new to Power-Fx, you can check my introductory post here on this which I wrote way back in 2021.

All you can do this is to execute few commands from VS Code, they directly run on your Dataverse environment.

Few prerequisites to follow:

  1. Install VS Code (install from here)
  2. Install Power Platform CLI (install from here)
  3. Install PowerShell Module for VS Code (install from here)
  4. Install Power Platform Tools for VS Code (install from here)
  5. Once you have everything installed you were good to go, few more steps required to set up your VS Code to run successfully.

As you have already installed the Power Platform Tools extension above, you should see an icon at the side bar as highlighted below.

Create an authentication profile for your target environment, click on the plus symbol besides the AUTH PROFILES, I have already created few earlier.

Provide your login credentials using the login prompt.

Once authenticated, you should be able to see all your environments in your tenant like below.

Open a terminal in VS Code

You should see something like below.

Now you were all set to run Power-Fx Commands targeting your envirnment, let’s try it out. In order to interact with Dataverse, use the below commands, thereby reducing the time and complexity of your Dataverse operations by using Power Fx.

1: pac org who: Displays information about your current Dataverse Organization

2: pac admin list :List all environments from your tenant.

3. Read-Eval-Print Loop & Dataverse Commands

We heard about Read-Eval-Print Loop while working on other languages mainly Python, we now have that included while using Power Fx, to start using if. Enter the below in your Vs Code Terminal, it should show something like below and now you can execute commands and once connected, you can use Dataverse commands.

By the way, we need to use Plural names below.

pac power-fx repl command:

a. Add Rows: Use Collect (Contacts, { firstname: “Pavan”, lastname: “Mani Deep”})

b. Help: Use Help ()

c. Exit: Use Exit() to exit the repl command

4. Run Power-Fx Commands from a file: All you need to do is save the Power-Fx commands in a text file at the below location.

pac power-fx run:

With this command, you can run a file of Power Fx instructions.

a. Create Dataverse records: By using same Collect Command we used above in a file.

Now execute the command

pac power-fx run –file Name of the file -e true

b. Query a Dataverse table: Save the below command in a file located in the folder path.

Now execute the command

c. Filter a Dataverse table: While I used the filter command, I was not able to filter the data, rather I was getting null. I hope Microsoft will be fixing this when these features are out of preview.

I hope this gives you an idea of how you can execute Power-Fx commands within your favorite IDE(Vs Code).

Cheers,

PMDY