Forum Discussion
Multi-Year cluster column chart structure question
- 5 years ago
Hi RyanLMoran ,
I assume that you have a LABID so you need to add the following two measures:
NumLabs = COUNTROWS ( FILTER ( ALL ( Labs[Install date], Labs[ID] ), Labs[Install date] <= MAX ( Labs[Install date] ) ) ) TotlSize = SUMX ( FILTER ( ALL ( Labs[Install date], Labs[ID], Labs[Lab size] ), Labs[Install date] <= MAX ( Labs[Install date] ) ), Labs[Lab size] )final result below and in attach PBIX file:
Hi RyanLMoran ,
Are there for any chance any rows repeat on your data? Is there any school that is repeated?
I see that you have a line per each of the schoold and the years but if for any chance you have repeated values the calculations can be miss counted.
Looking at the screen you present I'm not abble to check if there is repeated values on the schools names but the calculations should work properly.
Try to go to the query editor and add an Index column and then use that index for the calculation instead of the school name and chek if the additional values still appear in the final value.
Hi Miguel,
Thanks for all of the help. You telling me to go back and look at my data source pointed me to how I had it badly set up. When I was initially trying to figure out how to get the sum I put an equation into the Excel worksheet to sum the lab size totals. That sum was a row at the bottom of the lab size. So, your measure worked as it was grabbing my sum and adding that to the total. When I removed that and cleaned up my data source the number of labs and total PC's are summing and aggregating correctly. I added your measures to my notes to study and learn from. I truly appreciate all of the help and guidance. Thank you.