Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Dear Community,
Hope all are doing well and safe.
I'm trying to display the text type column data for the filters user selects in report.
For example I have two columns called Color and Type,When the user select Type from the slicer then the color for that selected type should display in Multi-row card visual. If nothing got filtered then the card should display blank
Color | Type
A | 1
B| 1
C | 2
D | 2
E | 2
P | 3
L | 4
Here when I select the type 2 and 3 it should show the related color value but initialy without any filters got selected the card visual should display blank.
I have tried isfiltered,allselected functions but getting an error saying cannot compare type text with True/False.
Kindly please help me acheive this.
Thanks in advance
Solved! Go to Solution.
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
#Lifesaver
I tried your solutions and It works as expected,Thank you so much for your timely support.
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
Hi @Charu ,
You need to create the following measure:
Colours =
IF (
ISFILTERED('Table'[Type] ),
CONCATENATEX ( 'Table', 'Table'[Color], ", " )
)
Pbix File attach
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @MFelix
I did try your measure which is working fine with my sample data but with the real data I'm getting the duplicates.
Here I have attached the screenshots for your reference.
Screenshot 1 : original column from the table
Screenshot 2 : For the original data the measure returns duplicated data but the expected result is Same as screenshot 1
Screenshot 3: With the sample data everything works fine.with out any filters visua appears blank and when we select it shows the related color data
Any thoughts why the screenshot2 returns data in such a way?
Thanks inadvance
Hi @Charu ,
Does your original table has duplicate values on the lines? the concatanex uses the full table so it's not checking if there is duplicates or not you can redo your measure to:
Colours =
IF (
ISFILTERED('Table'[Type] ),
CONCATENATEX ( DISTINCT('Table'[Color]), 'Table'[Color], ", " )
)
Basically just concateate the distinct values of the colours.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @MFelix
Original data has no duplicates,you could take a look at screenshot 1 which is the original data for specific type filtered.
Hi @Charu,
Sorry for insisting on this but when I ask if there is duplicates is on the data itself not on the values.
In the sample data I have tested duplicating a row and got the same result has you did so additional color with the same value, making use of the second formula error dissappear.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsMarch 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
95 | |
69 | |
44 | |
38 | |
30 |
User | Count |
---|---|
157 | |
101 | |
60 | |
42 | |
40 |