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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Anonymous
Not applicable

Convert text column to measure

Hey guys, 

 

I have a text column (values, such as 201, 203, F453 etc) and I want to convert that to measure in order to use it in another measure. 

 

I specifically need those three values to be filtered. How can i do that in dax?

 

Sona

9 REPLIES 9
KNP
Super User
Super User

Hi @Anonymous,

 

You haven't really provided enough info to answer this question.

What kind of measure do you need? Do you want to count the values? Do you want to SUM the values? What do you mean by "need those three values to be filtered?

 

Check this post for some tips on getting your questions answered.

 

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1891875#M725989  

 

Regards, 

Kim

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
xOIEmaj

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
image
fabric-SUbadge
Proud to be a Super User!
Anonymous
Not applicable

I need to create a measure that would just filter for those activities. 

Something like this:

Measure=if(activity=201 || activity=203 || activity=F453), "Yes", "No")

Sorry for the confusion,

Sona

Try:

Filtered activity =
IF(MAX(Table[Activity]) IN {"201", "203", "F453"}, "YES", "NO")





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






I would add a column first instead of a measure. You could do this in DAX or PowerQuery, and then use that in your measure.

 

KNP_0-1633116905197.png

 

PBIX file.

https://drive.google.com/file/d/1-1RBu2XQ7h8flUy-b2nxg7gDHEgxo1AW/view?usp=sharing 

 

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
xOIEmaj

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
image
fabric-SUbadge
Proud to be a Super User!
Anonymous
Not applicable

The problem is that if I create a column, I cant use it in a measure. When I type it, it does not come up in the measure. 

Sona

This is likely because you usually need to aggregate columns in a measure. If you write measure1 = Table1[Column1] then it doesn't know which value(s) in that whole column you want, so you need to use some sort of aggregating function like measure1 = SELECTEDVALUE ( Table1[Column1] ).

Sorry, I think you may need to take the time to explain your scenario a little better.

Provide some sample data, or a sample PBIX file that shows your issue, and your expected outcome.

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
xOIEmaj

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
image
fabric-SUbadge
Proud to be a Super User!
Anonymous
Not applicable

Thanks a lot!

I created super simple data similar to the actual one. 

So, I need to calculate the count distinct of application ID, when (Activity is 201 or 203)  or measure is 1. So, I need to have everyone that hit the measure as 1 or they have activity 201 or 203. 

 

File: https://drive.google.com/file/d/1Cs9iYD91TXdketi2gshwxQLsF93AMeqD/view?usp=sharing 

Thanks, 

Sona 

@Anonymous 

Can you make the link public? it is requiring a login





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.