Forum Discussion
Histogram based on measure values
- 3 years ago
- Anonymous3 years agoNot applicable
Many thanks Ashish_Mathur for your help, this has solved the challenge for me.
For future readers, I had to change a few things to customise the provided solution to my case:
1. Removed legend
2. Expanded the bins table to match ranges of my actual data and desired bin size
3.a Created measure [E2] = DistinctCount(Simulation number) as I was looking to show that instead of measure [E]= Sum(Earnings)
3.b adjusted the provided [E by bins] based on previous point, still needed to use [E] and the formula became like this:
E by bins = CALCULATE([E2],FILTER(ADDCOLUMNS(VALUES(Data[Simulation Number]),"ABCD",CALCULATE([E],CALCULATETABLE(VALUES(Data[Simulation Number])))),COUNTROWS(FILTER(Bins,[ABCD] >= Bins[Lower] && [ABCD] <= Bins[Upper])) >0))
4. For those interested in maintaining a continuos x-axis, I have created a new numeric column showing the midpoint of the bins (on the Bins table) and used that on the x-axis instead of bin names.
I had a need to use x-axis constant lines.
Here is my replication of the provided solution.- Ashish_Mathur3 years agoSuper User
You are welcome.