Forum Discussion
help creating line graph with two tables
- 4 years ago
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 measureID 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.
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.