Skip to main content

Posts

Showing posts from September, 2017

Ragged hierarchy in Power BI

Case- I have a data set which has to be visualized in a ragged hierarchy. What is ragged hierarchy A ragged hierarchy is a user defined hierarchy with an uneven number of levels.   You can see the above table which has 5 levels of hierarchy. In the first level we only have “World” as a category then moving forward to the next level we have two categories  namely “UK” and “USA” likewise the level of hierarchy is drilling down up to five levels with an uneven amount of categories. Creating a hierarchy in Power BI In the above image  you can notice that I have right clicked the “level 1” column which has to be the first level of our hierarchy, Once it is right clicked there you will notice “New hierarchy” as the second option then you will have to click that in order to create a new one. As you can notice in the above image once I have created a new hierarchy then a new column is created named “Level 1 Hierarchy” in that I have dragged and dro

R script editor to create an advanced pie chart in Power BI

Case- I want to create a pie chart using R visual in Power BI while being able to use all available features for a creation of pie chart in the programming language R. Creating an R visual In the above image you can notice the symbol R at the bottom of the line, this represents the R visual and I selected it to create one, then I dragged and dropped ProductName and ProductPrice as values for R script. Once you drag and drop a column then the values will be saved as a data frame in the R script of Power BI as shown in the below image. Define the values as ProductPrice and labels as ProductName We can define the values for the pie chart as ProductPrice from the dataset, dataset is the data frame that is predefined when we did the drag and drop in R visual fields. In order to call all the values from a specific column we need to use “$” symbol as shown below “dataset$ProductPrice” Now we need to assign the column values from the data set to the val

Implementing visual level filters using Dax in Power BI

Case- Observe the following screen shot. In the above image I want to view the prices of the selected products but it is displaying all the column values from the price list in the multi row card where it should show nothing when nothing is selected from the product name. Creating a dax measure which can ensure that the data set is filtered   Let us create a dax measure as following.  Only when filtered = IF (ISFILTERED (‘Product’ [ProductName]), "Y”, "N") This dax measure ensures whether a filtering has happened. If so it returns “Y” otherwise it returns “N”. Using the above created dax in visual level filter The above dax measure is applied to the visual level filter of the multi row card as shown below. you can just drag and drop the measure to the visual level filter. As you can notice I have used the above created measure “Only when filtered” to display data when it returns “Y”. In other words "Show items when th

Live connecting to Visual Studio tabular project via Power BI

Case –  Live connecting to visual studio analysis service tabular project via Power BI. Why this has happened  In some cases we have millions of data which is practically impossible to load into Power BI . In such situation it is easier to live connect the data with Power BI for faster data retrieval and analysis. What are needed and why are they needed You need to have Microsoft SQL Server Management Studio for managing the databases and tables also you need Microsoft Visual Studio to create an analysis tabular project also along with that you need Power BI to live connect to the tabular project for reports and dash board creation. Microsoft SQL Server Management Studio  Creating SQL Server Authentication    First you need to start Microsoft SQL Server Management Studio and create a new SQL server authentication. In order to do this first login with your windows authentication which does not require any password to connect. As shown in the above image