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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
bsheffer
Continued Contributor
Continued Contributor

measure in visual filter wanting number not text

I have a measure that returns text from a table which is overloaded so each name field contains a different data element and the value field contains a string.  Some of these strings are numeric but are stored as strings due to the mixed use.  So my measure is:

 

_acritem_Equipment_description =
calculate(
     FIRSTNONBLANK('Fact ACRITEM'[VALUE], 'Fact ACRITEM'[VALUE]),
     filter(
          'Fact ACRITEM',
          CONTAINSSTRING('Fact ACRITEM'[NAME], "Equipment") && CONTAINSSTRING('Fact ACRITEM'[NAME], "description")
     )
)
 
the table visual I put it in has the list of text values I expected.  But when I go to the filter pane and try to filter on these values, it just gives me numeric options or not blank.  Why isn't it giving the normal options of IS, CONTAINS, etc.?
2 ACCEPTED SOLUTIONS
Pragati11
Super User
Super User

Hi @bsheffer ,

 

Can you share the screesnshot for what is the data-type for this MODEL TYPE column?

 

I tried something similar at my end and it works fine:

Pragati11_0-1608226023731.png

 Can you try removing other filters and see if it works? I have a feeling that the already applied filters are doing something there.

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

View solution in original post

bsheffer
Continued Contributor
Continued Contributor

I didn't notice that measures default to decimal data type.  Once I changed the measure to text it worked fine.  Thanks for pointing me at the right place.

View solution in original post

5 REPLIES 5
Pragati11
Super User
Super User

Hi @bsheffer ,

 

Can you share the screesnshot for what is the data-type for this MODEL TYPE column?

 

I tried something similar at my end and it works fine:

Pragati11_0-1608226023731.png

 Can you try removing other filters and see if it works? I have a feeling that the already applied filters are doing something there.

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

bsheffer
Continued Contributor
Continued Contributor

I didn't notice that measures default to decimal data type.  Once I changed the measure to text it worked fine.  Thanks for pointing me at the right place.

Pragati11
Super User
Super User

Hi @bsheffer ,

 

Can you please add some screesnhots on your issue specially the numeric options thing?

This is not making your issue clear.

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

bsheffer
Continued Contributor
Continued Contributor

filter_treats_measure_as_number.png

so you can see that the Model Type has text values but in the filter pane it is giving me an error when I type in a string.  If I type in a number it doesn't give an error but also doesn't give the desired result.  Also notice the autoformating of the field is right justified as if the column value was a number.

bsheffer
Continued Contributor
Continued Contributor

in case it wasn't clear:  Equipment Description = Model Type

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.