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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
UsePowerBI
Post Prodigy
Post Prodigy

Measure for dates in columns

Hello

 

I have a table like the below:

 

null, null, 01/01/2021, 02/01/2021, ...

Prod1, Price, 1, 2, 3, ....

Prod1, Quantity, 1, 2, 3, ...

Prod2, Price, 1, 2, 3

 

I want to create a measure to put in a graph where the x axis will be the dates and the y axis will be the Price of each Prod per date and another of the Quantity of each Prod per date.

 

Do I need to transpose the table?

 

Can you provide some ideas for the Measure please?

 

Thanks!

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @UsePowerBI 

 

You need to do some operations in the power query editor.

1. Select the two columns with empty headings, and then select merge columns.

vzhangti_0-1638258608269.png

 

2. After merging the first and second columns, select Transpose directly.

vzhangti_1-1638258743450.png

 

3. Add index column

vzhangti_2-1638259065390.png

 

4. Add the date column that was just lost in the conversion process.

vzhangti_3-1638259139977.png

 

5. Is this the output you expect?

vzhangti_4-1638259240207.png

If the method I provided above can't solve your problem, what's your expected result? Could you please provide more details for it?

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-zhangti
Community Support
Community Support

Hi, @UsePowerBI 

 

You need to do some operations in the power query editor.

1. Select the two columns with empty headings, and then select merge columns.

vzhangti_0-1638258608269.png

 

2. After merging the first and second columns, select Transpose directly.

vzhangti_1-1638258743450.png

 

3. Add index column

vzhangti_2-1638259065390.png

 

4. Add the date column that was just lost in the conversion process.

vzhangti_3-1638259139977.png

 

5. Is this the output you expect?

vzhangti_4-1638259240207.png

If the method I provided above can't solve your problem, what's your expected result? Could you please provide more details for it?

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

lbendlin
Super User
Super User

Please provide sanitized sample data that fully covers your issue. Paste the data into a table in your post or use one of the file services. Please show the expected outcome.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.