In Power BI, you can create a new table from an existing one using DAX with specific filter conditions. This is done using functions like FILTER, SELECTCOLUMNS, or ADDCOLUMNS to include only the desired rows. It’s a powerful way to generate custom views of your data for reporting or analysis. This method helps keep your data model clean and focused on relevant insights.
Steps to create a new table from an existing one using DAX with specific filter conditions:
Below is the main table from which we will create another table using the SUMMARIZE function along with a FILTER condition
Use the code below to create a new table from the main table with a filter condition. E.g. Region = “USA”
SalesData_USA =
SUMMARIZE (
FILTER ( SalesData, SalesData[Region] = "USA" ),
SalesData[Year],
SalesData[Region],
SalesData[SalesAmount]
)
Below is the newly created table that contains data for the USA region only.
No comments:
Post a Comment