Forum Discussion
emilyh1
2 years agoFrequent Visitor
Specific Filtering in a Gannt Chart Based Off Parent Level
I am wanting to be able to filter differently for each different Project, at the parent level. If I select Project1 in a slicer, I only want certain Task items to appear at the task level for th...
Anonymous
2 years agoNot applicable
Hi emilyh1 ,
Based on your description, you can indeed use a switch statement to accomplish your goal, as you can see in this dax example:
DynamicFilteredTasks = CALCULATE(
COUNTROWS(Tasks),
FILTER(
Tasks,
SWITCH(
SELECTEDVALUE(Projects[ProjectName]),
"Project1", Tasks[TaskID] IN {2, 4, 6},
"Project2", Tasks[TaskID] IN {1, 3, 6, 7, 8},
FALSE()
)
)
)
You can follow the above dax logic to create the dax you need, if you still can't solve the problem, please provide the pbix file, so that we can help you faster, please hide the privacy information in advance.
Best regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly