Forum

Calculating # custo...
 
Notifications
Clear all

Calculating # customers / # orders in banding table

11 Posts
4 Users
0 Reactions
155 Views
(@alib40)
Posts: 113
Estimable Member
Topic starter
 

I've created a banding table that groups order value based on what is selected in a metric.

I want to be able to include the number of customers and the number of orders that make up the total order value in each of the groups eg (data not representative of the attached model)

 

Band       Value      # Customers       # Orders

<1000      3500            2                      5
<3500      7500            1                      1

 

I've tried lots of different ways but the # customer and # orders will not filter based on the time frame.

This is a non-standard calendar

I've attached a power bi model

 
Posted : 15/03/2019 4:09 pm
Philip Treacy
(@philipt)
Posts: 1630
Member Admin
 

PBI File attached

 
Posted : 15/03/2019 6:59 pm
(@mynda)
Posts: 4761
Member Admin
 

Hi Alison,

The Table filters for me when I click on a column in the chart.

Mynda

 
Posted : 16/03/2019 12:58 am
(@alib40)
Posts: 113
Estimable Member
Topic starter
 

the # customers and # orders is not calculating for each group banding - that's the issue.

I've tried all sorts - if I get the banding to work for customers and orders then the filter for periods doesn't work

the example model just has the basic workings - it doesn't work as I want it to

 
Posted : 16/03/2019 3:09 am
(@mynda)
Posts: 4761
Member Admin
 

Can you please give me an example of what you expect and what it's returning based on the file you provided so we can focus on one example to troubleshoot?

Thanks,

Mynda

 
Posted : 16/03/2019 7:41 am
(@alib40)
Posts: 113
Estimable Member
Topic starter
 

File attached with all the measures included.   the # Customers by Banding is the one that appears not to be working.

It looks like it is evaluating the total for the customer for the period and then putting it into a band rather than evaluating how many different customers make up the Order Banding column ie total of orders that are within the banding limits

Thanks

 
Posted : 16/03/2019 9:27 am
(@mynda)
Posts: 4761
Member Admin
 
This measure is summing the number of customer types, not the number of distinct customers:
 
# Customers by Banding = SUMX(Customer,IF([Selected Order Value Metric]>=[BandMin]&&[Selected Order Value Metric]<[BandMax],[Selected # Customer Type Metric]))
 
There is only 1 customer type for fiscal period 2 for orders <1000 and that's 'new' customers. Likewise for fiscal period 3. 
 
I hope that points you in the right direction.
 
Mynda
 
Posted : 18/03/2019 8:10 pm
(@alib40)
Posts: 113
Estimable Member
Topic starter
 

Thanks - changing this from [selected # Customer Type metric] to simply [# Customers] or removing the measure completely and adding DISTINCTCOUNT of CUST.ID doesn't give me the correct answers.   It still isn't working

In the case of Period 2 FY 2018 ALL Orders there are 3 different customer id's

In the case of Period 3 FY 2018 ALL Orders there are  3 different customer id's

Any ideas?

 
Posted : 19/03/2019 9:33 am
(@alib40)
Posts: 113
Estimable Member
Topic starter
 

Can someone help please?

 
Posted : 26/03/2019 10:13 am
(@mynda)
Posts: 4761
Member Admin
 

Hi Alison,

I've moved this thread to the open Power Pivot forum as this is outside the scope of the course and I don't currently have time to understand the complexities of your scenario. Hopefully someone else can take a look for you now that it's open to all forum members.

Mynda

 
Posted : 27/03/2019 7:34 pm
(@catalinb)
Posts: 1937
Member Admin
 

Hi Alison,

You have added fields from Banding table (Label) into the pivot table, but there is no relationship between Banding and Orders Intake tables.

Add a calculated column to Orders Intake table, to calculate where the Order Value fits: into <1000, <3500, and so on. Next, add a relationship between the Orders Intake-(new calculated column) and Banding table-Label column. Only then the pivot will be able to understand what you want and it will display the report as you expect.

 
Posted : 31/03/2019 8:18 am
Share: