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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
fbostan1
Frequent Visitor

help creating line graph with two tables

I have two table:

1st table) Trained RVP ID with one column RVP ID 

2nd table)  Contact time with many columns but one of it is RVP ID (this is all total RVP including trained ones)

both table are joined with RVP ID

I want to make a line graph  that shows over time with 2 lines, one shows trained people and another shows not trained people. 

how do I go about creating a line graph that works with this two table?

 

Any help would be greatly apprecaited, thank you!

1 ACCEPTED SOLUTION
PaulDBrown
Community Champion
Community Champion

Create a dimension table for RVP ID (new table option under Modeling in the ribbon) using:

RVP ID Table =

ADDCOLUMNS(VALUES(Table 2[RVP ID]), "Status", IF(MAX(Table 2[RVP ID]) IN VALUES(Table 1[RVP ID]), "Trained", "Untrained"))

 

delete the current relationship and add new one-to-many between the RVP ID table field and the corresponding field in Tabke 2. Use the fields from this RVP ID Table in the visuals, slicers, filters and measures. 
For the line graph, create the following measure

ID Count = DISTINCTCOUNT(Table 2[RVP ID])

now create the line chart with this measure and add the Status field from the RVP ID Table as the legend.





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






View solution in original post

1 REPLY 1
PaulDBrown
Community Champion
Community Champion

Create a dimension table for RVP ID (new table option under Modeling in the ribbon) using:

RVP ID Table =

ADDCOLUMNS(VALUES(Table 2[RVP ID]), "Status", IF(MAX(Table 2[RVP ID]) IN VALUES(Table 1[RVP ID]), "Trained", "Untrained"))

 

delete the current relationship and add new one-to-many between the RVP ID table field and the corresponding field in Tabke 2. Use the fields from this RVP ID Table in the visuals, slicers, filters and measures. 
For the line graph, create the following measure

ID Count = DISTINCTCOUNT(Table 2[RVP ID])

now create the line chart with this measure and add the Status field from the RVP ID Table as the legend.





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.