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
slhyrkl
Frequent Visitor

Need help to split multiple values in one column for the duplicated rows.

As shown in the picture I attached, Timage (1).pnghere is one part (part no 127316) has multiple values in the next column. I want to split those values into different columns based on the same part no. 78.96% is the current month's value and 53,51% is the last month's value and I want to create two different columns as "Current month", "Last month" and split these values into these columns. I have multiple parts that have multiple percentages but some of the parts only have one percentage. The upper value (78.96% ) is the current month and the below value (53,51%) is the last months value. This is the case for the other part numbers too. My main goal is to show the data like this and calculate the difference between months if there are values for two months for a part. How can I transform the data to achieve this?

1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@slhyrkl 

actually i don't suggest you to pivot table. 

 

you can create a column

Column =
VAR a=minx(FILTER('Table','Table'[c]=EARLIER('Table'[c])&&'Table'[d]<EARLIER('Table'[d])),'Table'[d])
return if(CALCULATE(count('Table'[d]),ALLEXCEPT('Table','Table'[c]))=1,"Current",if(ISBLANK(a),"last","Current"))
 
11.PNG
 
then you can create a measure to calcualte difference
Measure = CALCULATE(sum('Table'[d]),'Table'[Column]="Current") - CALCULATE(sum('Table'[d]),'Table'[Column]="last")
 
12.PNG
 
pls see the attachment below

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

1 REPLY 1
ryan_mayu
Super User
Super User

@slhyrkl 

actually i don't suggest you to pivot table. 

 

you can create a column

Column =
VAR a=minx(FILTER('Table','Table'[c]=EARLIER('Table'[c])&&'Table'[d]<EARLIER('Table'[d])),'Table'[d])
return if(CALCULATE(count('Table'[d]),ALLEXCEPT('Table','Table'[c]))=1,"Current",if(ISBLANK(a),"last","Current"))
 
11.PNG
 
then you can create a measure to calcualte difference
Measure = CALCULATE(sum('Table'[d]),'Table'[Column]="Current") - CALCULATE(sum('Table'[d]),'Table'[Column]="last")
 
12.PNG
 
pls see the attachment below

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




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