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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
gaurav21791
New Member

How to show division of two columns from different table in chart for the category

I have a chart that is group/categorized by month and year(Start Date column from table 1). I have two tables (Table 1 and Table 2) where both have the Start Date column. I want to show the division of the sum of amount column from Table 1 and the running total of the count of rows per category i.e. grouped by month and year.   

 

gaurav21791_1-1630415895190.png

 

 

Please let me know how can achieve this. Thanks for your help in advance. 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@gaurav21791 
I assumed you have a model with correct relationship, you can create the following measure and put on the graph in the values field.

Measure = Divide(
Sum(Table1[Amount]), 
Calcuate(countrows(table2),Filter(Allselected(table2), [Date]<=MAX([Date])&&[Cateogry]=Max(Category])))
)

 


Paul Zheng _ Community Support Team
If this post helps, please 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

@gaurav21791 
I assumed you have a model with correct relationship, you can create the following measure and put on the graph in the values field.

Measure = Divide(
Sum(Table1[Amount]), 
Calcuate(countrows(table2),Filter(Allselected(table2), [Date]<=MAX([Date])&&[Cateogry]=Max(Category])))
)

 


Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

 

PaulDBrown
Community Champion
Community Champion

Please follow the recommendations outlined in this thread:

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.