cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
opticshrew Member
Member

Measures within tables

Hi all,

 

I'm getting an issue around using measures within a table, bear with me whilst I try to explain.

 

Table 1 : Product Codes

Table 2 : Customers

Table 3 : Sales

 

I want to know how many customers have ordered a specific product so I have created a measure works out the following:

 

Total Customers with Product / Total Customers (This is shown as a percentage)

 

Total customers seems to get filtered by each row of the table and therefore it works this out instead

 

Total Customers with Product / Total Customers (Filtered by product row)

 

Is there anyway I can stop Total Customers from being filtered and rather calculate as if all Customers were available even those who did not purchase the product?

 

Thanks,

J

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
vcastello Member
Member

Re: Measures within tables

Hi @opticshrew

I think you may have to use the ALL() function.

It should be s'thing like ...

 

Absoulte Total Customers = CALCULATE(DISTINCTCOUNT(TableCustomers[CustomerID),ALL(TableCustomers))

 

Using ALL() you get rid of the filter

Hope That Helps

Vicente

View solution in original post

2 REPLIES 2
vcastello Member
Member

Re: Measures within tables

Hi @opticshrew

I think you may have to use the ALL() function.

It should be s'thing like ...

 

Absoulte Total Customers = CALCULATE(DISTINCTCOUNT(TableCustomers[CustomerID),ALL(TableCustomers))

 

Using ALL() you get rid of the filter

Hope That Helps

Vicente

View solution in original post

Highlighted
opticshrew Member
Member

Re: Measures within tables

Hi @vcastello

 

Your solution works a treat, thanks for the speedy reply.

 

Thanks,

J

Helpful resources

Announcements
Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors