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

Get Fabric certified for FREE! Don't miss your chance! Learn more

Reply
sirpentagon
Frequent Visitor

Split Tags based values

Hi, 

I am very new to PowerBI. I need help from the community.

I want to create a matrix to display Instances Details based on Tags value. The tags are created dynamically during the creation time of any instances.

 

My requirement is to filter out values based on the key-values tag, "CreatedBy", such that one can select either SuperAdmin or Admin or NormalUser to view the result. The value are not known initially. The no of records is more than 2.5-3 millions rows.

 

 

Example:

 

Tags

{“Name”:”Test”, “CreatedBy”:”SuperAdmin”}

{“Build”:”001”, “CreatedBy”:”SuperAdmin”}

{“Name”:”Test2”, “CreatedBy”:”NormalUser”}

{“Name”:”Test”, “CreatedBy”:”Admin”, “CreatedOn”:”02012020”}

1 ACCEPTED SOLUTION
Jimmy801
Community Champion
Community Champion

Hello @sirpentagon 

 

I don't know in witch format do you have this tags. I tried to find a solution if every tag is a row from a single-column table.

let
	Source = #table
	(
		{"Column1"},
		{
			{"{""Name"":""Test"", ""CreatedBy"":""SuperAdmin""}"},	{"{""Build"":""001"", ""CreatedBy"":""SuperAdmin""}"},	{"{""Name"":""Test2"", ""CreatedBy"":""NormalUser""}"},	
			{"{""Name"":""Test"", ""CreatedBy"":""Admin"", ""CreatedOn"":""02012020""}"}
		}
	),
	AddRecords = Table.AddColumn
	(
		Source,
		"Records",
		(add)=> 
		let 
			ReplaceData = Text.Remove(add[Column1], {"{", "}", """"}),
			SplitRecords = Text.Split(ReplaceData, ","),
			ToTable = Table.FromList(SplitRecords, Splitter.SplitByNothing(), {"Name"}),
			SplitColumn = Table.SplitColumn(ToTable, "Name", Splitter.SplitTextByDelimiter(":"), {"Name", "Value"}),
			ToRecords = Record.FromTable(SplitColumn),
			TabelToRecords = Table.FromRecords({ToRecords})


		in 
			TabelToRecords
	),
	Combine = Table.Combine
	(
		AddRecords[Records]
	)

in
    Combine

 

Copy paste this code to the advanced editor in a new blank query to see how the solution works. If this solution fits your need, copy and past a part of it and implement it in your query.

If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too

Have fun

Jimmy

 

View solution in original post

1 REPLY 1
Jimmy801
Community Champion
Community Champion

Hello @sirpentagon 

 

I don't know in witch format do you have this tags. I tried to find a solution if every tag is a row from a single-column table.

let
	Source = #table
	(
		{"Column1"},
		{
			{"{""Name"":""Test"", ""CreatedBy"":""SuperAdmin""}"},	{"{""Build"":""001"", ""CreatedBy"":""SuperAdmin""}"},	{"{""Name"":""Test2"", ""CreatedBy"":""NormalUser""}"},	
			{"{""Name"":""Test"", ""CreatedBy"":""Admin"", ""CreatedOn"":""02012020""}"}
		}
	),
	AddRecords = Table.AddColumn
	(
		Source,
		"Records",
		(add)=> 
		let 
			ReplaceData = Text.Remove(add[Column1], {"{", "}", """"}),
			SplitRecords = Text.Split(ReplaceData, ","),
			ToTable = Table.FromList(SplitRecords, Splitter.SplitByNothing(), {"Name"}),
			SplitColumn = Table.SplitColumn(ToTable, "Name", Splitter.SplitTextByDelimiter(":"), {"Name", "Value"}),
			ToRecords = Record.FromTable(SplitColumn),
			TabelToRecords = Table.FromRecords({ToRecords})


		in 
			TabelToRecords
	),
	Combine = Table.Combine
	(
		AddRecords[Records]
	)

in
    Combine

 

Copy paste this code to the advanced editor in a new blank query to see how the solution works. If this solution fits your need, copy and past a part of it and implement it in your query.

If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too

Have fun

Jimmy

 

Helpful resources

Announcements
Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.