Forum Discussion
Filter Table by Slicer Value
Hi all, I'm new to PowerBI and am stuck on a request that seems pretty straightforward:
I've created a PowerBi report that is embedded in a 3rd party application. Upon load of the report, a single filter is passed to the report to show only 1 single 'Project' record.
I have a slicer on the report that shows all 'projectbaseline' records related to the 'Project' that is passed as a filter. The user can select a single 'projectbaseline' record in the slicer. Each 'projectbaseline' record has a 'Created On' date field.
I would like to create a table visual that shows all 'Project Tasks' related to the Project that have a 'Created On' date after the 'Created On' date of the 'projectbaseline' record selected in the slicer. I would like this visual to update whenever a different 'projectbasline' record is selected in the slicer.
I tried creating a calculated table for this, but calculated tables don't refresh when a different projectbaseline is selected in the slicer.
I created a Calculated Measure that contains the 'Created On' date of the selected 'projectbaseline'. This measure does update whenever a different 'projectbaseline' is selected in the slicer, but I can't figure out how to filter the Project Task table based on this measure.
Any guidance is greatly appreciated! Thanks!
2 Replies
- CoreyPSolution Sage
I think you need to create a measure to act as a flag to filter your project tasks table. Something like:
Filter Flag = IF( 'ProjectTasks'[CreatedDate] > 'ProjectBaseline'[CreatedDate] , 1 , 0 ). Then apply this as a filter on the visual containing your project tasks where the value equals 1. To get this to work, you may need to set bi-directional filtering on the relationship between projectbaseline and projects. And possibly between tasks and projects. Give that a go and see what happens.
- daxishardNew Member
Thank You for your reply. I'm having trouble with this part of a the 'Filter Flag' measure:
Filter Flag = IF( 'ProjectTasks'[CreatedDate]
It seems I can't select 'ProjectTasks'[CreatedDate] as this isn't an aggregate/scalar value, maybe? So the measure won't accept this input. Any other ideas?
Thanks again for your reply.