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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Sumit626
Frequent Visitor

Unique list values in filter and when multiple values selected should filter comma seperated entry

i have a list of tags some of which are comma-separated as shown in the image below

 

8ff91dc0-3b76-4df9-8d97-a2927b6d82f9.jpg

 

when I use the same column in the filter it shows comma-separated entries as well as shown below

7bd09a91-4a40-4c75-95bd-468119772bd7.jpg

i want a list of unique entries in filter and when some select 2 tags such as operation and gxp it should show only those rows where tags are operations, gxp 

and not where there are individual entries of operations and gxp

Required tags filterRequired tags filter

 

any help would be really appreciated thanks 



1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Sumit626 

You can create a new measure

Measure = var a=CONCATENATEX(VALUES('Table 2'[Desc]),[Desc],",")
return IF(ISFILTERED('Table 2'[Desc]),CALCULATE(SUM(Sheet1[value]),FILTER(Sheet1,MAX(Sheet1[Tags])=a)),SUM(Sheet1[value]))

Note:Don't create the relationship between two tables

Output

vxinruzhumsft_0-1677658910630.png

 

Best Regards!

Yolo Zhu

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

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi @Sumit626 

You can refer to the following example.

Put the following code in Advanced Editor in power query

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WKi4pSixJTc9M1kmvKFDSUTI0UIrViVYCcnTyC1KBcpn5ecVAcSOIOFR5KVi5TllqalkiUNIYKBkLAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Tags = _t, value = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Tags", type text}}),
    #"Split Column by Delimiter" = Table.ExpandListColumn(Table.TransformColumns(#"Changed Type", {{"Tags", Splitter.SplitTextByDelimiter(",", QuoteStyle.Csv), let itemType = (type nullable text) meta [Serialized.Text = true] in type {itemType}}}), "Tags"),
    #"Changed Type1" = Table.TransformColumnTypes(#"Split Column by Delimiter",{{"Tags", type text}})
in
    #"Changed Type1"

Then put the new "Tags" columns to the slicer.

The information above just use the "split column by delimiter " function.

You can refer to the following link to know more about it.

Split columns by delimiter - Power Query | Microsoft Learn

 

Best Regards!

Yolo Zhu

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

hi 
i've created a unique list of filters using the following dax

Table 2 =
VAR _path =
    SUBSTITUTE (
        CONCATENATEX ( VALUES ( Sheet1[Tags] ), Sheet1[Tags], "," ),
        ",",
        "|"
    )
RETURN
    DISTINCT (
        SELECTCOLUMNS (
            ADDCOLUMNS (
                GENERATESERIES ( 1, PATHLENGTH ( _path ), 1 ),
                "Desc", PATHITEM ( _path, [Value] )
            ),
            "Desc",IF([Desc]<>"", [Desc]," ")
        )
    )


the issue is when i select for example gxp and operations it display all the entries containing either gxp or operations while the required behaviour is it should online display rows with gxp,operations
Anonymous
Not applicable

Hi @Sumit626 

You can create a new measure

Measure = var a=CONCATENATEX(VALUES('Table 2'[Desc]),[Desc],",")
return IF(ISFILTERED('Table 2'[Desc]),CALCULATE(SUM(Sheet1[value]),FILTER(Sheet1,MAX(Sheet1[Tags])=a)),SUM(Sheet1[value]))

Note:Don't create the relationship between two tables

Output

vxinruzhumsft_0-1677658910630.png

 

Best Regards!

Yolo Zhu

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

Hi,

I am a beginner at Power BI, and I have the same query as the one posted here. While your solution works for Table visual, It doesn't seem to work for card/ donut chart visual.

How can that be solved?

Hi,

Share some data to work with and show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors