Forum Discussion
Combining two x-axes from same table to plot two measures on same graph
lbendlin I think I am missing something...
Here is the structure of the reference table:
|
Student ID |
Time to Exit Status |
Exit Status |
Time to L3 Status |
L3 Status |
|
1 |
0 |
2 At Matriculation |
0 |
2 At Matriculation |
|
2 |
3 |
3 On time |
3 |
3 On time |
|
3 |
55 |
3 On time |
0 |
3 On time |
|
4 |
1500 |
4 Late |
500 |
4 Late |
|
5 |
|
1 N/A |
|
1 N/A |
|
6 |
1300 |
4 Late |
300 |
3 On time |
|
7 |
450 |
5 Not yet |
440 |
4 Late |
Here is one of the measures:
Not Met =
Var TOT_STS = Calculate(COUNT('Student Language Levels'[Time to Exit Status]),
'Student Language Levels'[Exit Status] <> "1 N/A"
&& NOT(ISBLANK('Student Language Levels'[Time to Exit Status]))
)
Var TOT_MET =
Calculate(COUNT('Student Language Levels'[Time to Exit Status]),
NOT('Student Language Levels'[Exit Status] IN {"1 N/A", "5 Not Yet"})
&& NOT(ISBLANK('Student Language Levels'[Time to Exit Status])),
FILTER(ALLSELECTED('Student Language Levels'), 'Student Language Levels'[Time to Exit Status] <= MAX('Student Language Levels'[Time to Exit Status]))
)
Var Percent_NOT_Met = Divide(TOT_STS-TOT_MET,TOT_STS)
RETURN Percent_NOT_Met
When I plot the measures against their respective "time" columns in the reference table, the respective plots work perfectly. But when I plot them against the new "days" table, I get a constant line which corresponds to the minimum value calculated by each measure.
Do I simply add a filter to the two measures to set the selected(time to status) to Days[day]? Something like && SELECTEDVALUE('Student Language Levels'[Time to Exit Status]) = 'Days'[Days] ?
Thanks a lot!!
Did you put the date column from the new table on the X axis? Maybe post the sample PBI here.
- MJEnnis3 years ago
Resolver III
lbendlin There is no date column. Just a whole number column which counts the number of days. That is of course based on the number of days between two dates. In theory, I could peel back the onion to access those dates in the measure and the new calcuated table, but not worth the hassle at this stage. I need the count column as I will be runing the survivor analysis package in R (if I can get it to work right in Power Bi). Cannot share the data, for privacy reasons, but what you see in the table above is what you get.
- lbendlin3 years ago
Super User
Please provide sanitized sample data that fully covers your issue.