Forum Discussion
Line and Stacked Colum - How to Show Average on Line?
- 2 years ago
In the Allexcepted put the column date that your are using in the charte.
Allexcepted will remove all filter on that table except on the column you mention, so I think it Could solve your problem.
Try...
Here's the data:
Expected result is that when you selected Nina who is studing Geology, the line and column chart will show Nina's logins every month as columns and plot the average logins for Geology on the line.
Please take a look it this is what you're looking for:
My AverageCourse measure it this:
AverageCourse =
IF(
NOT(ISBLANK([Count of Logins])),
CALCULATE(
[SimpleAvg],
FILTER(
ALL(T_Logins),
T_Logins[Event_Type]="Login" && T_Logins[Student_Course_Name] IN VALUES(T_Logins[Student_Course_Name])
)
)
)- cw9002 years ago
Helper I
What is
[SimpleAvg]
?
Also, that doesn't look right because the average value doesn't change each day. I need average value for the course on each day, so it will change every day.
- _AAndrade2 years ago
Resident Rockstar
cw900,
See if this solve your problem:
Measures:SimpleAvg = AVERAGE (T_Logins[Total]) New Avg = IF( NOT(ISBLANK([Count of Logins])), CALCULATE( [SimpleAvg], REMOVEFILTERS(T_Logins[Student]), T_Logins[Event_Type]="Login" ) )- cw9002 years ago
Helper I
Ok that is much closer. I changed the measure to this:
New Avg v2 =CALCULATE(AVERAGE (CourseData[Total]),CourseData[Event_Type]="Login",REMOVEFILTERS(CourseData[Student]))This works in the example here but when I apply this to my real data it doesn't work. I think because my real table contains many other fields other than Student_Course_Name.Is there any way in that measure to say only calculate the average based on Student_Course_Name?