How to return Previous Row value from a Column in Power BI
Suppose we have a Same data as follows..
from this data, column "TotalUnits", we wants generate new calculated column to show the same TotalUnits but the each row value should get from the Previous Row value.
This can be in one of the way, by creating a Index Column on this Table.
The Index Column can be created from Home>
How to Calculate Previous Weeks data based on Slicer Selection of Current Week in Power BI
Suppose we have a data Model as follows..
Based on this Model, We can develop a Report that shows the data for Previous 3 Weeks based on the Current Week , selected from the WeekNum slicer, as shown below:
In my report, I have used the less data so that we are seeing most of the
How to dynamically view YTD, QTD and MTD data using Time Intelligence Selector
Suppose we have the data Model in our Power BI Report as follows..
We have the "SelectMeasure" table with data as follows..
Next in this Table, we will create a new Measure using the below DAX Expression :
SelectorNum = MIN(SelectMeasure[SelectorNumber])
Next we create a Slicer (Horizontal
How to use the SUMMARIZE Function to Summarize data Group By specific Columns in Power BI DAX
The SUMMARIZE Function in Power BI DAX is used to create a Summary Table from the Fact Table, and data will be Grouped by the specific columns from the related Dimension Tables or from the same Fact Table.
Suppose we have our Power BI Data Model as follows..
Now from the above Data
How to Calculate Accumulative Total using EARLIER Function in Power BI
EARLIER is a DAX function acts exclusively on row context, and its purpose is to create a reference to a column value on an outer loop of the evaluation of the expression.
It is commonly used in Calculated Columns during nested row by row iterations.
column : A column or
How the GROUPBY and CURRENTGROUP Functions will work in Power BI DAX
The GROUPBY function is similar to the SUMMARIZE function. However, GROUPBY does not do an implicit CALCULATE for any extension columns that it adds. GROUPBY permits a new function, CURRENTGROUP(), to be used inside aggregation functions in the extension columns that it adds. GROUPBY attempts to reuse the data that has been
Creating a dynamic Dates Table from the Source Data of Data Model
Suppose, we have a table FactSales, having the Sales details data, for 3 Years, FY14, FY15 and FY16.
Now based on the above source table "FactSales", column "Order_Date" , we can generate the Dates Table using the below methods with DAX Expressions.
1) ADDCOLUMNS Method :
Using the AddColumns Function, along
How extract FIRST NON BLANK and LAST NON BLANK values from a Column in Power BI
The FIRSTNONBLANK() Function returns the first value in the column, column, filtered by the current context, where the expression is not blank.
The LASTNONBLANK() Function returns the last value in the column, column, filtered by the current context, where the expression
How to Analyze and Identify the returning Loyal Customers with SQL in SQL Server
Suppose there is Retail Store, where the Business Owner wants to Identify the how many Customers are frequently buying from the Store each Month, till the Year End.
The Customers who are buying from the Store in the initial First 3 Months will be Flagged as "Base Customers".
Any Customers who started
How to use the DAX LOOKUPVALUE Function in Power BI
The LOOKUP VALUE Function works like a VLOOKP Function in Excel. The VLOOKUP in Excel will return the First matching value when there were multiple Matches, but the Dax LOOKUPVALUE Function will throw an error "Multiple values was supplied where single value was expected".
It also works like a RELATED Function in DAX, but LOOKUPVALUE does not