Forum Discussion
Grouping histogram bars
- 5 years ago
Hi errepinna ,
Is below what you need?
Check the updated .pbix file attached.
Best Regards,
KellyDid I answer your question? Mark my post as a solution!
Hi errepinna ,
Modify your measures as below:
%impactAoverTotA =
//SUM('A type sale'[A value])/CALCULATE(SUM('A type sale'[A value]), REMOVEFILTERS('type'[Type]))
var _sumA=CALCULATE(SUM('A type sale'[A value]),FILTER(ALL('A type sale'),'A type sale'[Location Code]=MAX('location'[Location Code])&&'A type sale'[Type]=MAX('type'[Type])))
var _sumtotal=SUMX(ALL('A type sale'),'A type sale'[A value])
Return
DIVIDE(_sumA,_sumtotal)%impactBoverTotB =
//SUM('B type sale'[B Value])/CALCULATE(SUM('B type sale'[B Value]), REMOVEFILTERS('type'[Type]))
var _sumB=CALCULATE(SUM('B type sale'[B Value]),FILTER(ALL('B type sale'),'B type sale'[Location Code]=MAX('location'[Location Code])&&'B type sale'[Type]=MAX('type'[Type])))
var _sumtotal=SUMX(ALL('B type sale'),'B type sale'[B Value])
Return
DIVIDE(_sumB,_sumtotal)
Then turn off "Concatenate labels" under X axis:
And you will see:
For the related .pbix file,pls see attached.
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
Hello, thank you for your help!
However, this isn't what I'm trying to achieve. I'm already using an all-page filter to select a single "sale type" (RIC, DID, etc).
On top of that, I'm trying to display the two columns not piled up but separated, so that I can visualize their different height.
So the information is, for example: I want to see, for each location, how much (in %) of total sale A was realized on type DID compared to all Sale A. So I put a filter on the view for type DID and calculate the the %impactonA by removing the DID filter from the denumerator.
I do the same with sale B.
I want to see them close together instead of piled up. I don't care about having the different types on the axis because each type gets his view.
I'm sorry if I wasn't clear about it before.
- v-kelly-msft5 years agoCommunity Support
Hi errepinna ,
Is below what you need?
Check the updated .pbix file attached.
Best Regards,
KellyDid I answer your question? Mark my post as a solution!
- errepinna5 years agoHelper I
Worked out! Thanks!