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
Anonymous
Not applicable

Pass selected slicer value(Text) into a measure

Hi,

 

*I'm using Report Server Desktop "RS".

I have a slicer that shows text values instead of numbers.  I would like to create a measure that takes the selected "text"value(Column A) in a slicer, filters Column B based on the selected value in Column A. Then returns a "count" or "distinct count" of the filtered rows. 

 

I tried building a measure but I'm returned with a message "Cannot convert value XXXX of type Text to type Number".

This seems like a simple formula but I'm not using the right syntax for DAX.

 

Heres a table example:

 

Column A-Slicer filters on this column

Dog
Cat

Mouse

Horse

Column B

PitBull

Corgi

Tabby Cat

Jack Russell

 

Thank you

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous ,

The error message "Cannot convert value XXXX of type Text to type Number" suggests that there might be a mismatch in data types being compared or operated on in your DAX formula. This is a common issue when dealing with text and numeric data types, as DAX expects explicit data type alignment for operations.

 

How would you like column A to be filtered and column B to be filtered? For example, if you select dog in slicer, will column B filter PitBull and Corgi? Is there another column that proves that PitBull and Corgi belong to dog?

 

How to Get Your Question Answered Quickly - Microsoft Fabric Community

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

 

Anonymous
Not applicable

Hello,

 

Yes, if I select dog in slicer, column B will filter PitBull and Corgi. 

Also Column A and B are apart of the same table.  I would like the measure to count the filtered column B and return a number count. 

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.