Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
thhmez7
Helper III
Helper III

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

1 ACCEPTED SOLUTION
v-luwang-msft
Community Support
Community Support

Hi @thhmez7 ,

According info your provided,pls refer the following sample:

sample data:

vluwangmsft_1-1640152570545.png

 

Dax for new column:

New Status = CALCULATE(MAX('Table'[Account]),
       FILTER(ALL('Table'),
         'Table'[Account]=EARLIER('Table'[Account])&&'Table'[Status]="Active"))

Fianl output result:

vluwangmsft_2-1640152595252.png

 

 

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:

vluwangmsft_3-1640152957522.png

 

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

View solution in original post

2 REPLIES 2
v-luwang-msft
Community Support
Community Support

Hi @thhmez7 ,

According info your provided,pls refer the following sample:

sample data:

vluwangmsft_1-1640152570545.png

 

Dax for new column:

New Status = CALCULATE(MAX('Table'[Account]),
       FILTER(ALL('Table'),
         'Table'[Account]=EARLIER('Table'[Account])&&'Table'[Status]="Active"))

Fianl output result:

vluwangmsft_2-1640152595252.png

 

 

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:

vluwangmsft_3-1640152957522.png

 

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

mh2587
Super User
Super User

col = Calculate(account name ,tablename[satus]="Active")


Did I answer your question? If so, please mark my post as a solution!


Proud to be a Super User!




LinkedIn Icon
Muhammad Hasnain



Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.