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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
RichOB
Post Partisan
Post Partisan

Adding a column

Hi, in my real-life example, I don't have the individual columns per category, but I need them.

In the example below, how can I add the Bike, Scooter, and Skate columns based on the first 3 columns with the amounts in each row, please?

 

DateCategoryAmountBikeScooterSkate
01/04/2025Bike475475  
01/04/2025Bike600600  
01/04/2025Bike350350  
02/05/2025Scooter200 200 
02/05/2025Bike750750  
02/05/2025Skates150  150
02/05/2025Scooter80 80 
03/06/2025Skates200  200
03/06/2025Skates225  225
03/06/2025Skates300  300


Thanks

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

@RichOB In Power Query, it would be something like:

Bike = if [Category] = "Bike" then [Amount] else null

Scooter = if [Category] = "Scooter" then [Amount] else null

Skates = if [Category] = "Skates" then [Amount] else null

 

In DAX it would be:

Bike = IF( [Category] = "Bike", [Amount], BLANK() )

Scooter = IF( [Category] = "Scooter", [Amount], BLANK() )

Skates = IF( [Category] = "Skates", [Amount], BLANK() )


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...

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi @RichOB ,

 

We haven’t received an update from you in some time. Could you please let us know if the issue has been resolved?
If you still require support, please let us know, we are happy to assist you.

 

Thank you.

Anonymous
Not applicable

Hi @RichOB ,

 

I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions.

 

Thank you.

Anonymous
Not applicable

Hi @RichOB ,

 

I wanted to follow up on our previous suggestions. We would like to hear back from you to ensure we can assist you further.

 

Thank you.

Anonymous
Not applicable

Hi @RichOB ,

Thank you for reaching out to the Microsoft fabric community forum.

 

As rightly explained by @Greg_Deckler , you can achieve this either in Power Query using conditional column logic or in DAX using calculated columns. Both methods will create the expected output where each category has its own column, and the corresponding amount appears only when applicable.

Please feel free to choose the method that best fits your transformation stage (Power Query vs. data model). Also Please reach out for further assistance.

 

Thank you.

Greg_Deckler
Community Champion
Community Champion

@RichOB In Power Query, it would be something like:

Bike = if [Category] = "Bike" then [Amount] else null

Scooter = if [Category] = "Scooter" then [Amount] else null

Skates = if [Category] = "Skates" then [Amount] else null

 

In DAX it would be:

Bike = IF( [Category] = "Bike", [Amount], BLANK() )

Scooter = IF( [Category] = "Scooter", [Amount], BLANK() )

Skates = IF( [Category] = "Skates", [Amount], BLANK() )


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...

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.