Forum Discussion
Group by and summarize
- 3 years ago
Hi again
It's true that the Gantt chart doesn't accept the measures as input to the start and/or end dates. However, a workaround is just to add the calculations of start and end dates as calculated columns instead and use these in the Gantt chart.
The thing is that - depending on the size of your report - unneccesary tables may affect the performance. And here, I don't think it's necessary.
So just add calculated columns for you start and end dates like this:And use these in the Gantt chart, like this:
I then achieve this Gantt chart visual:
Hope this helps.
Best regards.
Hi,
I'm trying to use Custom Visual like Gantt (https://appsource.microsoft.com/en-us/product/power-bi-visuals/WA104380765?tab=Overview).
Each campaign has many taks and each of them has a start/end date. I want to show campaigns with start date (so the minimum from its tasks) and end date (the maximum from its tasks), this way:
The problem is that into the variables it supporting the end date as maximum but not the start date:
If I add the start date I got the details of the tasks I don't want:
So my idea wa to create a new table where I don't have the task details so I create a table summary with:
Summary = SUMMARIZE(Weekly,Weekly[Budget Owner],Weekly[Campaign])and on that table I added some calculated measurements:
MaxEndDate =
VAR CampTable=
FILTER(
ALL(Weekly),
Weekly[Campaign] =SELECTEDVALUE(Weekly[Campaign])
)
RETURN
MAXX(CampTable,
Weekly[Date End].[Date]
)
MinStartDate =
VAR CampTable=
FILTER(
ALL(Weekly),
Weekly[Campaign] =SELECTEDVALUE(Weekly[Campaign])
)
RETURN
MINX(CampTable,
Weekly[Date Start].[Date]
)Spend =
VAR CampTable=
FILTER(
ALL(Weekly),
Weekly[Campaign] =SELECTEDVALUE(Weekly[Campaign])
)
RETURN
SUM(
Weekly[Spend]
)
They are working properly as table:
but the visual does not accept calculated measurement as input so it is like I have to create the table, measurement inclued, in the first step with the SUMMARIZE
Hi again
It's true that the Gantt chart doesn't accept the measures as input to the start and/or end dates. However, a workaround is just to add the calculations of start and end dates as calculated columns instead and use these in the Gantt chart.
The thing is that - depending on the size of your report - unneccesary tables may affect the performance. And here, I don't think it's necessary.
So just add calculated columns for you start and end dates like this:
And use these in the Gantt chart, like this:
I then achieve this Gantt chart visual:
Hope this helps.
Best regards.