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
Highlighted
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
Highlighted
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

opticshrew Member
Member

Re: Measures within tables

Hi @vcastello

 

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

 

Thanks,

J

Helpful resources

Announcements
Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Ask Amanda Anything Q&A

Ask Amanda Anything Q&A

Learn the answers to some of the questions asked during the Amanda Triple A event.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Users Online
Currently online: 196 members 2,266 guests
Please welcome our newest community members: