DAX

TOTALYTD and DATESYTD Functions in Power BI DAX

In Power BI DAX, both TOTALYTD and DATESYTD functions are used for year-to-date calculations, but they serve slightly different purposes and are used in different contexts. Here’s a detailed comparison along with examples. 1. TOTALYTD The TOTALYTD function is used to calculate the year-to-date total for a given measure or expression. It simplifies the process …

TOTALYTD and DATESYTD Functions in Power BI DAX Read More »

KEEPFILTERS and REMOVEFILTERS in Power BI

In Power BI DAX, both KEEPFILTERS and REMOVEFILTERS are functions used to manipulate filters within calculations. Let’s delve into each with an example: 1. KEEPFILTERS: The KEEPFILTERS function is used to preserve existing filters while applying new filters within a calculation. It ensures that only the specified filters are applied, keeping all other filters intact. …

KEEPFILTERS and REMOVEFILTERS in Power BI Read More »

LOOKUPVALUE Function in Power BI with Example and Data

The LOOKUPVALUE function in DAX is used to return a single value from a column based on specified conditions. This function is particularly useful for finding values in a related table without creating a formal relationship between tables. Syntax dax Example Data Assume we have two tables: ProductInfo and SalesData. ProductInfo Table ProductID Category 1 …

LOOKUPVALUE Function in Power BI with Example and Data Read More »

TREATAS function in power bi DAX with example and data

The TREATAS function in Power BI is used to apply the result of a table expression as the filter to columns from an unrelated table. It effectively changes the context in which data is evaluated, enabling cross-table calculations without explicit relationships. Here’s an example to illustrate the TREATAS function with example data: Example Scenario Suppose …

TREATAS function in power bi DAX with example and data Read More »

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 »