Power BI

Datesinperiod and DateBetween Function – DAX Power BI

In DAX (Data Analysis Expressions) for Power BI, the DATESINPERIOD and DATESBETWEEN functions are used to create dynamic date ranges for time-based calculations. Here’s a detailed look at each function and how they can be used. DATESINPERIOD The DATESINPERIOD function returns a table containing a contiguous set of dates, shifting backwards or forwards based on …

Datesinperiod and DateBetween Function – DAX Power BI Read More »

Dateadd Function DAX Power BI with Examples and Visualization

The DATEADD function in DAX (Data Analysis Expressions) is used to shift a set of dates by a specified interval. This function is particularly useful for creating measures that compare data across different time periods, such as month-over-month or year-over-year comparisons. Syntax DAX Common Use Cases Example 1: Previous Month Sales To calculate sales for …

Dateadd Function DAX Power BI with Examples and Visualization Read More »

Previous Year, Previous Month DAX in Power BI

In Power BI, using DAX (Data Analysis Expressions) to calculate Previous Month and Previous Year Sales is a common requirement for time-based comparisons. Here’s how you can create these calculations, using the sample data structure described earlier. Sample Data Structure Assume we have the following columns in our Sales table: We also assume a DateTable …

Previous Year, Previous Month DAX in Power BI Read More »

Power BI, Year-to-Date (YTD), Month-to-Date (MTD), and Quarter-to-Date (QTD) calculations

In Power BI, Year-to-Date (YTD), Month-to-Date (MTD), and Quarter-to-Date (QTD) calculations are commonly used to analyze cumulative data up to a specific point in time within a given period. These time intelligence functions are particularly useful for comparing performance over similar periods. Below is an explanation of how to calculate YTD, MTD, and QTD using …

Power BI, Year-to-Date (YTD), Month-to-Date (MTD), and Quarter-to-Date (QTD) calculations Read More »