The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi,
I have two visuals, a table containing tasks (with Start & End dates) and a line chart showing costs. I'm trying to get it so that if I select a task, then the line chart is filtered to teh start & end date of the task. E.g. If I select Task1, then the line chart will be filtered to the costs incurred during the date range of Task1.
This would be even better if I could use a Gantt chart for the tasks instead of a table, but to my knowledge that is not possible.
So, any ideas?
Solved! Go to Solution.
Hi, @StillLearning1
According to your description, you want to filter the line chart when you select the task in table.
This is my test data:
(1)We can create a measure like this:
Measure = var _start_date = MIN('Task'[Start Date])
var _end_Date = MAX('Task'[End Date])
var _cur_date = MAX('Table'[Date])
return
IF(_cur_date>=_start_date && _cur_date <= _end_Date , SUM('Table'[Value]), BLANK())
(2)Then we can put this measure on the line chart and the result is as follows:
And for how to create a Gantt chart , you can refer to this :
How to Create a Gantt Chart in Power BI (Fast and Easy) (spreadsheeto.com)
If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem. (You can also upload you sample .pbix [without sensitive data] to the OneDrive and share with the OneDrive link to me ! )
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi, @StillLearning1
According to your description, you want to filter the line chart when you select the task in table.
This is my test data:
(1)We can create a measure like this:
Measure = var _start_date = MIN('Task'[Start Date])
var _end_Date = MAX('Task'[End Date])
var _cur_date = MAX('Table'[Date])
return
IF(_cur_date>=_start_date && _cur_date <= _end_Date , SUM('Table'[Value]), BLANK())
(2)Then we can put this measure on the line chart and the result is as follows:
And for how to create a Gantt chart , you can refer to this :
How to Create a Gantt Chart in Power BI (Fast and Easy) (spreadsheeto.com)
If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem. (You can also upload you sample .pbix [without sensitive data] to the OneDrive and share with the OneDrive link to me ! )
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Thanks!
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
76 | |
65 | |
52 | |
51 |
User | Count |
---|---|
128 | |
117 | |
78 | |
65 | |
63 |