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 September 15. Request your voucher.

Reply
Anonymous
Not applicable

Get 2 rows(Duplicate) for each row based on slicer selection

Hi,

I have a requirement to show the same row based on slicer selection.


when index is selected as TTF then automatically i need to see 2 rows of same columns as per below screenshot.

 

LikhithaVG123_0-1688480192884.png
when index is selected as Matif then automatically i need to see 2 rows of same columns as per below screenshot.

LikhithaVG123_1-1688480292599.png


may i know how to acheive this ? Please any suggestion will help


Thanks

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

Please try below steps:

1. below is my test table

Table:

vbinbinyumsft_0-1688626157454.png

Table2:

vbinbinyumsft_1-1688626179756.png

2. create a measure with below dax formula

Measure =
VAR idx =
    SELECTEDVALUE ( 'Table 2'[Index] )
VAR tmp =
    SUMMARIZE (
        ALL ( 'Table' ),
        [Index],
        [Last Value],
        [Assumption Scenario],
        [Correlation],
        "CTN", COUNTROWS ( 'Table' ),
        "ID", CONCATENATEX ( 'Table', [ID] )
    )
VAR tmp1 =
    FILTER ( tmp, [CTN] >= 2 && [Index] = idx )
VAR str =
    CONCATENATEX ( tmp1, [ID] )
VAR val =
    IF ( CONTAINSSTRING ( str, SELECTEDVALUE ( 'Table'[ID] ) ), 1, 0 )
RETURN
    IF ( HASONEFILTER ( 'Table 2'[Index] ), val, 1 )

3. add  a table visual with Table fields, add a slicer with Table 2 field, add measure to table visual filter pane and set

Animation08.gif

Please refer the attached .pbix file.

 

Best regards,
Community Support Team_Binbin Yu
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

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous ,

Please try below steps:

1. below is my test table

Table:

vbinbinyumsft_0-1688626157454.png

Table2:

vbinbinyumsft_1-1688626179756.png

2. create a measure with below dax formula

Measure =
VAR idx =
    SELECTEDVALUE ( 'Table 2'[Index] )
VAR tmp =
    SUMMARIZE (
        ALL ( 'Table' ),
        [Index],
        [Last Value],
        [Assumption Scenario],
        [Correlation],
        "CTN", COUNTROWS ( 'Table' ),
        "ID", CONCATENATEX ( 'Table', [ID] )
    )
VAR tmp1 =
    FILTER ( tmp, [CTN] >= 2 && [Index] = idx )
VAR str =
    CONCATENATEX ( tmp1, [ID] )
VAR val =
    IF ( CONTAINSSTRING ( str, SELECTEDVALUE ( 'Table'[ID] ) ), 1, 0 )
RETURN
    IF ( HASONEFILTER ( 'Table 2'[Index] ), val, 1 )

3. add  a table visual with Table fields, add a slicer with Table 2 field, add measure to table visual filter pane and set

Animation08.gif

Please refer the attached .pbix file.

 

Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Hi,


Any suggestions please ?

Thanks

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.