Forum Discussion
Using a Slicer to Indirectly Filter a Line Chart
- 5 years ago
Ok, so the issue here is because your data model is different to what you described in your first post. In there you only mentioned a single table, so I shared code that would work with a single table, but because you have a separate calendar table and columns from that are on the axis of your graph you should create a measure like the following and use that to filter your slicer and graph
FTE (all time) = CALCULATE( SUM( 'Master Filtered'[FTE] ) , ALL('Calendar'))
So you should be able to do this by creating a measure that calculates the total FTE across all dates and then check if this is > 0 in your chart. The expression to calculate a total FTE across all dates would look like the following:
Total FTE = CALCULATE( SUM( Table[FTE] ), ALL(Table[Date]) )
d_gosbell Thank you. I think I understand. Will this make it so that only the projects that sum to zero don't display? If a project has even one day where the FTE is greater than zero I want it to be in the list that is ploted. If it has no days I don't want it in the list that is plotted.
I don't see how proejects are a part of your equation above.
- d_gosbell5 years agoSuper User
Anonymous wrote:
d_gosbell Thank you. I think I understand. Will this make it so that only the projects that sum to zero don't display? If a project has even one day where the FTE is greater than zero I want it to be in the list that is ploted. If it has no days I don't want it in the list that is plotted.
Yes, it's basically counting the FTE for ALL dates
I don't see how proejects are a part of your equation above.
Because I'm only using the ALL function over the date column any filter on any of the other columns will remain active. That way you could use this same measure for graphs on person or hour type.
Or if you only every wanted this calc to work across different projects instead of ALL( Table[Date] ) you could do ALLEXCEPT( Table[Project] ) which would keep any current selections on Project but strip them off all other columns.