Forum Discussion
Pareto without Bars?
- 4 years ago
It is indeed relatively complex, so I will provide an actual working example.
I downloaded the .pbix from this article and created a new Axis table and a new measure:
Bucket Sales = VAR BucketMin = SELECTEDVALUE ( 'Axis'[Value] ) VAR BucketMax = CALCULATE ( MIN ( 'Axis'[Value] ), 'Axis'[Value] > BucketMin ) VAR NonZeroProducts = FILTER ( VALUES ( Products[ProductKey] ), [Total Sales] > 0 ) VAR NonZeroCount = COUNTROWS ( NonZeroProducts ) VAR Summary = ADDCOLUMNS ( NonZeroProducts, "@Rank%", DIVIDE ( RANKX ( NonZeroProducts, [Total Sales] ), NonZeroCount ) ) VAR BucketSum = SUMX ( FILTER ( Summary, [@Rank%] >= BucketMin && [@Rank%] < BucketMax ), [Total Sales] ) RETURN DIVIDE ( BucketSum, NonZeroCount )The result looks like this:
See the attached modified file.
I'm still a little confused. I made the Axis table, but I'm confused where to change the axis in my formula. Since my SKUs are not currently done by percent, will I need to make a new column where they are done by percent?
It is indeed relatively complex, so I will provide an actual working example.
I downloaded the .pbix from this article and created a new Axis table and a new measure:
Bucket Sales =
VAR BucketMin = SELECTEDVALUE ( 'Axis'[Value] )
VAR BucketMax = CALCULATE ( MIN ( 'Axis'[Value] ), 'Axis'[Value] > BucketMin )
VAR NonZeroProducts = FILTER ( VALUES ( Products[ProductKey] ), [Total Sales] > 0 )
VAR NonZeroCount = COUNTROWS ( NonZeroProducts )
VAR Summary =
ADDCOLUMNS (
NonZeroProducts,
"@Rank%", DIVIDE ( RANKX ( NonZeroProducts, [Total Sales] ), NonZeroCount )
)
VAR BucketSum =
SUMX (
FILTER ( Summary, [@Rank%] >= BucketMin && [@Rank%] < BucketMax ),
[Total Sales]
)
RETURN
DIVIDE ( BucketSum, NonZeroCount )
The result looks like this:
See the attached modified file.
- Thigs4 years ago
Helper IV
This is very helpful, thank you!
I am clearly messing something up. I replaced the values in the formula with my own, and I'm getting the following graph.
- Anonymous4 years agoNot applicable
Hi Thigs ,
I think AlexisOlson 's reply is helpful and it should be the workaround to your problem. If you still couldn't solve your problem by this reply, please share a sample file with us. This will make it easier for us to check your formula and find the solution.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.