Donate

Power BI Nested Filter Function Alternative In DAX

Hello Team,

I've started learning grasping the concepts of DAX through videos and blog posts using DAX Studio since most of the tasks I'm currently working are Power BI reports. I also want to experiment on how can I simplify or modify the formula using other functions so as to make it easier to understand. One example is a nested Filter() formula below.
EVALUATE
FILTER (
 FILTER ( Products, Products[UnitPrice] > 50 ),
 Products[UnitsInStock] > 10
)
The first parameter of the outer FILTER() function is another filter which returns a table Products with UnitPrice of greater than 50. Then the second parameter filters the table returned by removing Products whose UnitInStock is less than or equal to 10. Upon recognizing the formula, I can simplify that to use AND() function and pass those two filter conditions in the function. The simplified formula, returns same results.
EVALUATE
FILTER (
    Products,
    AND ( Products[UnitPrice] > 50, Products[UnitsInStock] > 10 )
)
Output
Power BI Nested Filter Function Alternative In DAX

Comments

Donate

Popular Posts From This Blog

WPF CRUD Application Using DataGrid, MVVM Pattern, Entity Framework, And C#.NET

How To Insert Or Add Emojis In Microsoft Teams Status Message

TypeScript Error Or Bug: The term 'tsc' is not recognized as the name of a cmdlet, function, script file, or operable program.