Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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
Hi @Returnofthemack ,
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.
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
9 | |
5 | |
4 | |
3 | |
2 |
User | Count |
---|---|
12 | |
9 | |
7 | |
2 | |
2 |