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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
khaycock
Helper I
Helper I

Combining Data

Hello,

 

Is it possible to create extra lines based on data in other columns? I have three fields that I need to be one field so it can be a generic filter:

target.PNG

 

I'm conscious that amending the data and adding extra lines with the same data will upset the relationship as this is a table that holds keys.

 

Is there a way to do this?

10 REPLIES 10
v-lid-msft
Community Support
Community Support

Hi @khaycock ,

 

We can try to use the following measure to meet your requirement:

 

1. unpivote those columns

 

2.jpg

 

 

2. remove the attribute columns

 

3.jpg

 

3. remove duplicate values in value column

 

4.jpg

 

4. then you can merge with other queries:

 

5.jpg


Best regards,

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-lid-msft 

Thanks for the help. The only issue is that the rest of this table holds keys so I can't just remove duplicates as it will remove data. The unpivot thing worked initially but because it then duplicated the ID, it messed up the relationship. Here is a snippet of the whole table's data so you can see what I mean. 

target 2.PNG

Hi @khaycock ,

 

How about the result after you follow the suggestions mentioned in my original post?Could you please provide more details about it If it doesn't meet your requirement?


Best regards,

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi,

Please show the exact result you are expecting.


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

Hi @khaycock ,

 

If you want to create a slicer and if it select Sussex, then the if will show the record with row 1, 2, 5, 6, 8, 11 and 13, we can create a calculated table as slicer:

 

Slicer =
DISTINCT (
    UNION (
        DISTINCT ( 'Table'[Target List 1] ),
        DISTINCT ( 'Table'[Target List 2] ),
        DISTINCT ( 'Table'[Target List 3] )
    )
)

 

Then we can create a measure and use it in visual filter to meet your requirement:

 

Filter In Date =
CALCULATE (
    COUNTROWS ( 'Table' ),
    FILTER (
        'Table',
        [Target List 1] IN FILTERS ( Slicer[Target List 1] )
            || [Target List 2] IN FILTERS ( 'Slicer'[Target List 1] )
            || [Target List 3] IN FILTERS ( Slicer[Target List 1] )
    )
)

 

3.jpg

 

 

Or we can create a duplicate query of table in Power Query Editor, then remove other column and use the unpivote solution to create such a slicer table

 

4.jpg5.jpg

 

Please also refer to this similar thread: https://community.powerbi.com/t5/Desktop/Use-Same-Filter-for-Multiple-Columns/td-p/880356


Best regards,

 

 

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Greg_Deckler
Community Champion
Community Champion

You could create a query to get each column (3 queries) and then use an Append query to append them all together.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Hi Greg,

 

Does the above query work to append? I'm not sure how to append a manually created query as it's not in the Power Query Editor?

Refer:https://radacad.com/append-vs-merge-in-power-bi-and-power-query

 

Also in DAX we have union function

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
az38
Community Champion
Community Champion

Hi @khaycock 

try a new calculated table

Table 2 = FILTER(
DISTINCT(
UNION(
SELECTCOLUMNS('Table',"Target List", 'Table'[Target List 1]),
SELECTCOLUMNS('Table',"Target List", 'Table'[Target List 2]),
SELECTCOLUMNS('Table',"Target List", 'Table'[Target List 3])
)
), NOT(ISBLANK([Target List])))

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

How can I connect this to the rest of the data so I can use it to filter?

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors