How to write a DAX formula, when you want to compare the Sales to a previous time period. For instance, what would be the last year's sales during the same period or maybe last month or last quarter sales? Let us see how we can compute that using simple DAX. Calculating sales for the previous … Continue reading DAX – Time Comparison
A calculated column is just like any other column in a table defined by a DAX expression and is evaluated on a row-by-row basis. A calculated column can also be used to define a relationship if required. However, a calculated column always uses RAM and wastes valuable space. Measures are another way of calculating using … Continue reading Calculated Columns and Measures in Power BI
Using Adventureworks DB create a Table-Valued Function to return number of orders and Total Sales for each employee and department. To Call the Function...
UNIQUE constraint is used to enforce uniqueness of a column. It means that all values in the column are different i.e. the column should not allow any duplicate values. Both PRIMARY KEY and UNIQUE KEY are used to enforce uniqueness of a column. What is the difference between Primary Key and Unique Key? A table … Continue reading Unique Key Constraint with Example
Stored Procedure Function In Stored Procedure it is optional, it can return zero, single or multiple values Function Must Return Value Stored Procedures are pre-compile objects and can be executed whenever it is called Function is compiled and executed every time when it is called. Stored Procedure Can Accept Both Input and Output Parameters Function … Continue reading Difference between Stored Procedure and Functions in SQL Server