Power BI – Report Builder using Multi Value Parameters in DAX

December 20, 2019

How to create a Multi Value Parameter Report in Power BI Report Builder

You can download PBI Report Builder here

This builder looks very familiar to the SSRS Report Builder you are used to from MS Reporting Services

Building a single value parameter in DAX is easy.

But creating a Multi Value Parameter requires quite some steps …

image

Solution :

These are the steps to follow :

1. Create a Data Set with the SLICER value in PBI Desktop

2. Copy the PBI Query

Run the Performance Analyzer in PBI Desktop

image

Start Recording and Refresh

image

Copy the Query to the Main Data Set

image

And apply the Filters in the next step …


3. Create new Parameter referencing to the Main Data Set Query Filter

To create a Parameter in the RBI Report Builder you first have to create a new Data Set

image

The same way go to the Performance Analyzer and copy the Query from the corresponding Slicer

image

And add it to the Filter Data Set and test the DAX.

image

3. Create a PBI Report Builder Report Parameter

image

Select the values from the Parameter Data Set created earlier

image


4. Add a Parameter in the Main Sales Data Set

image

 Add the @xxx Report Parameter variable in the DAX Query

Run the report and test the Report Parameters

image

Enjoy !!



Office365 – How to Block Self Service Purchase Apps

December 5, 2019

Microsoft is enabling all O365 user to use self service Apps.

This means everyone on your tenant can start purchasing certain apps by default …

If you want disable this behaviour than you need to use PowerShell.

SOLUTION :

1. Download and install the PS MSCommerce Module

Install-Module -Name MSCommerce 

image

2. Next import the module and connect

Import-Module -Name MSCommerce

Connect-MSCommerce

image

3. Run these commands to see the status

Get-MSCommercePolicy -PolicyId AllowSelfServicePurchase 

Get-MSCommerceProductPolicies -PolicyId AllowSelfServicePurchase 

image

4. To disable 1 or all the products run this commands

Update-MSCommerceProductPolicy -PolicyId AllowSelfServicePurchase -ProductId CFQ7TTC0KP0P -Enabled $False  
Update-MSCommerceProductPolicy -PolicyId AllowSelfServicePurchase -ProductId CFQ7TTC0L3PB -Enabled $False  
Update-MSCommerceProductPolicy -PolicyId AllowSelfServicePurchase -ProductId CFQ7TTC0KP0N -Enabled $False 

5. To disable all in Batch run this command

Get-MSCommerceProductPolicies -PolicyId AllowSelfServicePurchase | `

Where { $_.PolicyValue -eq “Enabled”} | `

forEach { 

Update-MSCommerceProductPolicy -PolicyId AllowSelfServicePurchase -ProductId $_.ProductID -Enabled $false  }

image

You can check the status again :

image

Enjoy !