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

creating a data trend from two tables

I have been trying to create a trend visual from two tables and I dont find the best way to do it.

the table captures the status of a job request each week which is appended.

1.jpg

In another excel sheet I have the weeks date

2.png

I would like to create a graph that shows the trends over time. Something like the below picture:

33.jpg

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @merinadica,

 

You should unpivot w1, w2, w3 from your table 1 then remove the w and make a relationship between both tables then add the values to a line chart.

 

See attach PBIX file with data and example.

 

Regards,

MFelix


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

3 REPLIES 3
MFelix
Super User
Super User

Hi @merinadica,

 

You should unpivot w1, w2, w3 from your table 1 then remove the w and make a relationship between both tables then add the values to a line chart.

 

See attach PBIX file with data and example.

 

Regards,

MFelix


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



Hi @MFelix

Thank you for your response. it worked just fine. I have a follow up question. I was successfully able to unpivot in the query editor and reproduce the same graph for my example. However, in my original problem, the data is creating by post processing the data from another sources.

I use various DAX functions to create the columns in the modeling section of power BI desktop. Is there a way to use DAX function to unpivot the columns dynamically? Every week the number of the columns will be added. In the example the data were shown for only 3 weeks.

Hi @merinadica,

 

You cannot unpivot columns with DAX.

 

Is your columns of the weeks variable, or are you adding information a week at a time?

 

Regards,

MFelix


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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