Forum Discussion
Filter text DAX column
Hi,
kind of simple question:
How can I create a new text column with DAX in which it's filtered by another text column. I don't want to use the filter in the filterpane, but in the new column.
For example
Account names that have the filter Status = Active.
thank you
Hi thhmez7 ,
According info your provided,pls refer the following sample:
sample data:
Dax for new column:
New Status = CALCULATE(MAX('Table'[Account]), FILTER(ALL('Table'), 'Table'[Account]=EARLIER('Table'[Account])&&'Table'[Status]="Active"))Fianl output result:
If you want to dynamically filter,I suggest you use measure and visual:
New Status1 = CALCULATE(MAX('Table'[Account]),FILTER(ALL('Table'),'Table'[Account]=MAX('Table'[Account])&&'Table'[Status]="Active"))Final output:
Did I answer your question? If so ,pls mark my post as a solution,if not ,could you pls share your sample data and expected output result.Remember to remove confidential data.
Best Regards
Lucien
2 Replies
- mh2587Super User
col = Calculate(account name ,tablename[satus]="Active")
- v-luwang-msftCommunity Support
Hi thhmez7 ,
According info your provided,pls refer the following sample:
sample data:
Dax for new column:
New Status = CALCULATE(MAX('Table'[Account]), FILTER(ALL('Table'), 'Table'[Account]=EARLIER('Table'[Account])&&'Table'[Status]="Active"))Fianl output result:
If you want to dynamically filter,I suggest you use measure and visual:
New Status1 = CALCULATE(MAX('Table'[Account]),FILTER(ALL('Table'),'Table'[Account]=MAX('Table'[Account])&&'Table'[Status]="Active"))Final output:
Did I answer your question? If so ,pls mark my post as a solution,if not ,could you pls share your sample data and expected output result.Remember to remove confidential data.
Best Regards
Lucien