Forum Discussion
Using group by function in dax
- 6 years ago
Hi Anonymous ,
Here’s my DAX, which is a column:F_value = VAR x = FILTER( Sheet4, [Anchor Config] = EARLIER([Anchor Config]) && [Target Config] = EARLIER([Target Config]) ) VAR y = CONTAINS( x, [Compare Value], "Yes" ) RETURN IF( y = TRUE(), "Yes", "NO")And here’s my test result:
Best regards,
Lionel ChenIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Lionel,
It works. Thanks. But can you also explain the DAX to me? I'm not a regular user of advanced DAX functions.
Hi Anonymous ,
First, return a table by grouping two columns: [Anchor Config] & [Target Config], the function I used is "EARLIER()":
Second, determine if there is a 'yes' in the table (the table is the first step's return ), the function I used is "CONTAINS()":
At last, use IF function to return the column.
If you understand the 'Context' in DAX, it will be easy.
Row context & filter context
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly