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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
andyspa
Helper I
Helper I

semicolon Country field

Hello everybody!

 

I have the following issue.. the dataset contains in each row a project. The filed country is populated with more than one, separated by semicolon. I also have a field with the revenue of the project. Any idea how can I assign equally that revenue to each country in the country field? The poin is that my boss wants an overview by country and this seems hard to get. 

 

Please see the chart attached.chart.PNG

1 ACCEPTED SOLUTION

@andyspa , You need to create custom column in power query 

I tried , this is the custom column in power query before you split to divide the amount

 

= List.Count(Text.Split([Users],","))

View solution in original post

5 REPLIES 5
amitchandak
Super User
Super User

@andyspa , Split the data in power query into rows. Before that create a column like this in power query and divide your amount

Divide by= List.Count(Text.Split([Column]))+1

 

refer for split column https://www.youtube.com/watch?v=FyO9Vmhcfag

 

 

Hello @amitchandak and thanks for your suggestion. I didn't know i could split clumns into rows! AWESOME!

 

Regarding the formula, I get the error "Token Eof expected".. 

@andyspa , You need to create custom column in power query 

I tried , this is the custom column in power query before you split to divide the amount

 

= List.Count(Text.Split([Users],","))

thanks. so i created that custom column (what's "users" in brackets?). Then I split and then create another custom column with the division?

Pragati11
Super User
Super User

Hi @andyspa ,

 

You will have to transform your data in Power Query. Can you share a file with your sample data?

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.