Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need to draw a chart which shows by month, the number of customer that spent between,
0
0-1000
1000-3000
3000 plus.
However I dont have the banded groups, just the amount the spent. For example I want someone that spent 1005 to be banded in the 1000-3000 band and then display a stacked bar from counting the number of customers in each. PLEASE HELP
A calculated dimension will help as below.
if ( aggr(sum(Sales),[Customer}) = 0 , '0',
if ( aggr(sum(Sales),[Customer}) >0 and aggr(sum(Sales),[Customer}) <=1000, '0-1000,
if( aggr(sum(Sales),[Customer}) >1000 and aggr(sum(Sales),[Customer}) <=3000, '1001-3000',
if( aggr(sum(Sales),[Customer}) >3000,'3000+')
)
)
)
Then create a count( distinct [Customer]) as your expression.
A calculated dimension will help as below.
if ( aggr(sum(Sales),[Customer}) = 0 , '0',
if ( aggr(sum(Sales),[Customer}) >0 and aggr(sum(Sales),[Customer}) <=1000, '0-1000,
if( aggr(sum(Sales),[Customer}) >1000 and aggr(sum(Sales),[Customer}) <=3000, '1001-3000',
if( aggr(sum(Sales),[Customer}) >3000,'3000+')
)
)
)
Then create a count( distinct [Customer]) as your expression.
Brilliant, just Brilliant. Confused me a little as think the } need to be ] but that you very much!
Just need to work out how to change the order they appear on the chart, for some reason its 3000, then 0, 0 -1000, 1000-3000 but sure even I can eventually work that out!
NP - you can put a custom sort order using the same expression logic on the sort tab. Leverage 'by expression' on the sort tab.