Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
WinterGarden
Helper IV
Helper IV

Displaying count value in the tooltip of a Gantt chart

Hi All,

I've created a gantt chart as per below screenshot:

WinterGarden_1-1742744502868.png

I've two tabels: Project , Project Task. There is a one - many relationship between these two tables(Project[Name]----Project Task[Project]).

I need to display the count of Task in the tooltip of this gantt chart. 

for eg: if Project[Name] = SP1 GOMBU, then the Task count  = 6  ie. sum of Project Task[Task]
Project[Name] = GOMBU PW Template , then the Task count  = 4
Project[Name] = DN Demo Template , then the Task count  = 2

Not able to add a measure in the tooltip, so i created a calculated column, but it is not giving the correct count.

Total Task Count = CALCULATE(COUNT('Project Task'[Task]),Project[Name] = SELECTEDVALUE('Project Task'[Project]))

could you please help me with this dax, to display the correct Task count



1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @WinterGarden ,

Here is my sample data:

vjunyantmsft_0-1742782813924.png
vjunyantmsft_1-1742782821229.png

Use this DAX to create a calculated column:

Total Task Count = 
CALCULATE(
    COUNTROWS('Project Task'),
    ALL('Project Task'),
    'Project Task'[Project] = EARLIER('Project Task'[Project])
)

And the final output is as below:

vjunyantmsft_2-1742782903729.png

vjunyantmsft_3-1742782912922.png


Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @WinterGarden ,

Here is my sample data:

vjunyantmsft_0-1742782813924.png
vjunyantmsft_1-1742782821229.png

Use this DAX to create a calculated column:

Total Task Count = 
CALCULATE(
    COUNTROWS('Project Task'),
    ALL('Project Task'),
    'Project Task'[Project] = EARLIER('Project Task'[Project])
)

And the final output is as below:

vjunyantmsft_2-1742782903729.png

vjunyantmsft_3-1742782912922.png


Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@Anonymous ,
Thank you so much 😊

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors