Add rows to Power BI dataset for date range
Hi in this blog we will see how we can add rows to power bi dataset for a given date range. For example if you have a dataset which has start and end date and you want rows for each date between this range then this blog will help you. Step 1: Open Power BI load your dataset and go to transform data. Right click on your from date column and change its type to date. Step 2: From add columns click on custom column Step 3: In custom column formula add following code: { Number.From([From])..Number.From([To]) } Step 4: Expand this column to new rows to get your result. Step 5: Change the datatype of this column to date. In this way you can prepare your dataset for all the dates present in your From and To column. Hope this helps.
Share Story :
DAX For Relationships in Power BI
Hi everyone in this blog we will see the different DAX that are used to define or use the relationship between two tables. In Power BI there are two type of relationships 1. One to One (1:1) 2. One to Many (1:*) Now lets look at the DAX functions that we can use with these relationships. USERELATIONSHIP- Specifies the relationship to be used in a specific calculation as the one that exists between columnName1 and columnName2. Syntax USERELATIONSHIP(<columnName1>,<columnName2>) Where, columnName1 The name of an existing column, using standard DAX syntax and fully qualified, that usually represents the many side of the relationship to be used; if the arguments are given in reverse order the function will swap them before using them. This argument cannot be an expression. columnName2 The name of an existing column, using standard DAX syntax and fully qualified, that usually represents the one side or lookup side of the relationship to be used; if the arguments are given in reverse order the function will swap them before using them. This argument cannot be an expression. Key Point The function returns no value; the function only enables the indicated relationship for the duration of the calculation. Example = CALCULATE(SUM(ISales[SalesAmount]), USERELATIONSHIP(Sales[ShippingDate], DateTime[Date])) Limitations USERELATIONSHIP can only be used in functions that take a filter as an argument. USERELATIONSHIP cannot be used when row level security is defined for the table in which the measure is included. RELATED – Returns a related value from another table. Syntax RELATED(<column>) Where, column – The column that contains the values you want to retrieve. Key Point A single value that is related to the current row. Example FILTER( ‘Sales_USD’, RELATED(‘Territory'[TerritoryCountry])<>”United States”) RELATEDTABLE Evaluates a table expression in a context modified by the given filters. Where, tableName – The name of an existing table using standard DAX syntax. It cannot be an expression. Key Point A table of values. Example = SUMX( RELATEDTABLE(‘Sales_USD’) , [Amount_USD]) Limitation The RELATEDTETABLE function changes the context in which the data is filtered, and evaluates the expression in the new context that you specify. This function is a shortcut for CALCULATETABLE function with no logical expression. This function is not supported for use in Direct Query mode when used in calculated columns or row-level security (RLS) rules. Hope this helps.
Share Story :
How you can prevent yourself from coming into the defaulter list
In this blog we will see how you can prevent yourself from coming into the defaulter list. Lets first understand the different criteria for a user to fall in defaulter list. The follow up date of the case is less than today’s date. The day difference between last notes added and follow up date is greater than 5 days. For critical priority case notes not added after every two hours. Now since we know the criteria we can make a habit of always looking at our assigned cases either when we logged in or while logging out so that our follow up dates will not miss. As notes on the case are very important not just for the defaulter list but for clients and management to get insights of what is happening on the case, we should put notes on every action we do on the case. Hope this helps.
Share Story :
Add effects to Power BI Buttons
Hello Friends, in this blog we will see how to add effects to Power BI buttons. Steps: Open Power BI desktop and select blank button from ribbon. Now add a rectangular strip to your button to look more attractive with the following configuration. Now add another button with transparency 50 % in default state just to create the feel of not focused state. Make sure to turn off background. Add hover state configuration for fill property of newly added button. Place the button on your old button. Final button will look like this. You can add click state for button Hope this helps.
Share Story :
How to create Azure SQL database from Azure Portal
Hello friends, In this blog we will learn how to create an Azure SQL database in Azure portal. Steps: Go to www.portal.azure.com and create new resource of SQL Database. Create New database, click on new server and fill the necessary details, the login id and password will be the same that you will use to authenticate the database. Now the database is ready! You can click on Basic pricing tire to change the pricing of the database.Pricing Overview of Azure SQL: BASIC STANDARD PREMIUM DATA SIZE MAX 2 GB 250 GB 500GB DTU MAX 5 50 4000 PRICE (INR) /Month 329.89 4958.54 1057537.88 Hope this helps!
Share Story :
How to embed Power BI Report in Python Web application
In this article, we will embed a Power BI report in a python web application. Following are the steps to embed a report. STEPS: Go to Power BI web service and open the report that you want to embed in your web application, then click o the file menu and select the Embed option. The following window will pop up. Now copy the highlighted URL and save it somewhere you will need that URL later. Also copy the iframe tag in your web application’s front end logic. You can also adjust the height and width of the iframe. Now open the .py file where your routs are set. Now copy the highlighted URL and assigned it to one variable as shown below. Now remove the URL of iframe and replace it with the variable in the following way. you have to enter your Power BI credentials. The final output will look like this.Hope this helps.