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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
yogeshmaney
Helper I
Helper I

Calculate for Comma Separated Values

Hello

 

Have Data as

Unit      |  Category 

5           |  Cat1,Cat2

3           |  Cat2

 

Want Result as

Cat1  = 5

Cat2  = 8

 

 

1 ACCEPTED SOLUTION
Eric_Zhang
Microsoft Employee
Microsoft Employee

Check this Power Query demo, it would help re-model your source from

 

Capture.PNG

 

To

 

Capture.PNG

 

let
    Source = Table.FromRows({{5,"Cat1,Cat2,Cat3"},{2,"Cat2"},{3,"Cat1,Cat2,Cat3"}},{"Unit","Category"}),
    Splitedsrc=Table.AddColumn(Source ,"splitCategory",each Table.FromList(Text.Split([Category],","))),
    ExpandedSplitCatesrc=Table.ExpandTableColumn(SplitedSrc, "splitCategory", {"Column1"}, {"splitCategory"})
in
    ExpandedSplitCateSrc

Then I think it is not a problem doing the calculation in your post. 

View solution in original post

1 REPLY 1
Eric_Zhang
Microsoft Employee
Microsoft Employee

Check this Power Query demo, it would help re-model your source from

 

Capture.PNG

 

To

 

Capture.PNG

 

let
    Source = Table.FromRows({{5,"Cat1,Cat2,Cat3"},{2,"Cat2"},{3,"Cat1,Cat2,Cat3"}},{"Unit","Category"}),
    Splitedsrc=Table.AddColumn(Source ,"splitCategory",each Table.FromList(Text.Split([Category],","))),
    ExpandedSplitCatesrc=Table.ExpandTableColumn(SplitedSrc, "splitCategory", {"Column1"}, {"splitCategory"})
in
    ExpandedSplitCateSrc

Then I think it is not a problem doing the calculation in your post. 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.