Forum Discussion
How to create a Many to One relationship to create line graph
- 7 years ago
HI, Anonymous
You could try this way as below:
Step1:
In Edit Queries, select Supplier ID column then right-click ->Unpivot Other Columns
or select 2017 Q1 - 2018 Q4 column Unpivot Columns
Step2:
Filter blank value and click Close&Apply
Step3:
You could drag the field Attribute ino X-Axis and use this measure as Value
Measure = CALCULATE(COUNTA(Table1[Value]))
or add a year quarter fact table and create the relationship with data table by Attribute .
Result:
Best Regards,
Lin
Hi,
Which 2 Tables are you talking about? There is only 1 Table there.
- Anonymous7 years agoNot applicable
Sorry, I should have been more clear. To create a continuous Line Graph, I had to transpose the original table to the table below:
So when I create a visual in Power BI, the Quarters will be on the X-Axis and the count of dates for each quarter will be on the Y-Axis. When I do this, the Suppier ID is in individual columns, there's no way for me to create a relationship. Maybe i'm heading in the wrong direction.
I'm just trying to get a Line Graph with Quarters on the X-Axis and Count of Dates on the Y-Axis.
- Ashish_Mathur7 years ago
Super User
Hi,
Paste the Table here so that i can take it into an Excel file.