Forum Discussion
StdDev from Mean by Category
- 10 years ago
Thanks for the suggestion v-haibl-msft. I actually solved this over the weekend a different way but I'll see if I can find the time to go back and try that method. What I ended up doing was merging my three tables into a single table and then wrapping the calculation of the average in a CALCULATE statement with an ALLEXCEPT clause that included the two categories that I wanted to factor into the calculation dynamically. Worked as expected once the data was all in a single table. You can actually see the end result here in the Data Stories Gallery:
I just published it last night. Thanks again KGrice for taking a look at this also.
Thanks KGrice. This definitely works and essentially what I asked for, but not what I want! :)
I was *hoping* that I could make this measure dynamic such that I could put a slicer on the page and when the user clicked the slicer, it calculated things correctly.
The end go is that I will probably have two categories, "rural", "urban", etc. and then a category on level of poverty "<= 10%", "11%-20%".
Sorry, I feel like I'm whining... :)
Maybe you can try to use the ALLSELECTED function to make the measure dynamic according to your slicer.
Best Regards,
Herbert
- Greg_Deckler10 years ago
Community Champion
Thanks for the suggestion v-haibl-msft. I actually solved this over the weekend a different way but I'll see if I can find the time to go back and try that method. What I ended up doing was merging my three tables into a single table and then wrapping the calculation of the average in a CALCULATE statement with an ALLEXCEPT clause that included the two categories that I wanted to factor into the calculation dynamically. Worked as expected once the data was all in a single table. You can actually see the end result here in the Data Stories Gallery:
I just published it last night. Thanks again KGrice for taking a look at this also.