Forum Discussion
AGScottThompson
4 years agoFrequent Visitor
Clustered Chart Group Total
How do you calculate a percent based on a group? I am trying to figure out the percentage of each value in a group in a cluster chart. Each Bar should be the percentage relative to the group not the entire data set.
Here is where I am at:
ClientCount = DISTINCTCOUNT('Real Estate Final'[Client])
ALLClientCount = CALCULATE('GeneralMeasure'[ClientCount],ALLselected('Real Estate Final'))
ClientCountPCT = GeneralMeasure[ClientCount]/GeneralMeasure[ALLClientCount]
Current
This is the example I need to create (sorry about the unreadable numbers)
<1M 34%,64%,2%
$1-4.9M 33%,62%,5%
Target
AGScottThompson try this:
ClientCount = DISTINCTCOUNT('Real Estate Final'[Client]) ALLClientCountInDescription = CALCULATE([ClientCount],REMOVEFILTERS('Real Estate Final'), VALUES('Real Estate Final'[Description])) ClientCountPCT = [ClientCount]/[ALLClientCountInDescription]AGScottThompson make sure the Year Column comes from the right table
4 Replies
- SpartaBICommunity Champion
AGScottThompson try this:
ClientCount = DISTINCTCOUNT('Real Estate Final'[Client]) ALLClientCountInDescription = CALCULATE([ClientCount],REMOVEFILTERS('Real Estate Final'), VALUES('Real Estate Final'[Description])) ClientCountPCT = [ClientCount]/[ALLClientCountInDescription] - SpartaBICommunity Champion
AGScottThompson make sure the Year Column comes from the right table
- AGScottThompsonFrequent Visitor
That is almost working for me, but I need to add 2 filters in. I tried
ALLClientCountInDescription = CALCULATE([ClientCount],REMOVEFILTERS('Real Estate Final'),VALUES('Year'[Year]) ,VALUES(RealEstate_TIVBandSort[Description]) )But it does not apppear to be working.- SpartaBICommunity Champion
AGScottThompson I need more info 🙂
You can PM me to show me on zoom?