Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Messrs Ferrari and Russo (The Definitive Guide to DAX, p. 348) published a brilliant measure [PercOnParent] for calculating percentages on hierarchies. My problem has been that it doesn't work if I sort my row labels on another column. For anyone familiar with their measure, why does this happen and how can I fix it?
Solved! Go to Solution.
I'm not familiar with the measure you talk about, but I know how to write % of parent. I can tell you that if you sort your columns, you need to include both the column name and sort column in any ALL function. So this
CALCULATE(SUM(table[value]),ALL([category]))
becomes this.
CALCULATE(SUM(table[value]),ALL(prod[category],prod[category sort]))
i cover this towards the bottom of this article. https://exceleratorbi.com.au/the-all-function-in-dax/
Also brilliant--thank you, Matt!
PS: I'm enjoying the new 3rd ed. of Supercharged!
I'm glad you like it. I always appreciate a review at Amazon if you are willing. This is one of the best ways that other people can find my book (which is good for me, and them, I think 🙂 )
I'm not familiar with the measure you talk about, but I know how to write % of parent. I can tell you that if you sort your columns, you need to include both the column name and sort column in any ALL function. So this
CALCULATE(SUM(table[value]),ALL([category]))
becomes this.
CALCULATE(SUM(table[value]),ALL(prod[category],prod[category sort]))
i cover this towards the bottom of this article. https://exceleratorbi.com.au/the-all-function-in-dax/
User | Count |
---|---|
12 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
24 | |
19 | |
14 | |
10 | |
7 |