cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
shaykoooo Regular Visitor
Regular Visitor

CALCULATE and COUNTROWS

Hi,
If I am interested to count how many customers have purchased 250 $ and above, will the following measure do the trick?
Measure:= CALCULATE,(COUNTROWS(Fact_Table), Fact_Table[Sales_Amount]>=250)

Thanks!
2 ACCEPTED SOLUTIONS

Accepted Solutions
Super User
Super User

Re: CALCULATE and COUNTROWS

Hi @shaykoooo

If there's only one row per customer in your fact table then it would work. Otherwise it wouldn't.

Community Support Team
Community Support Team

Re: CALCULATE and COUNTROWS

Hi @shaykoooo,

 

As AlB said, if your table is like below, the measure you mentioned should work.

 

count.PNG

 

If you still need help, please share some data sample which could  reproduce your scenario so that we could help further on it.

 

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 REPLIES 2
Super User
Super User

Re: CALCULATE and COUNTROWS

Hi @shaykoooo

If there's only one row per customer in your fact table then it would work. Otherwise it wouldn't.

Community Support Team
Community Support Team

Re: CALCULATE and COUNTROWS

Hi @shaykoooo,

 

As AlB said, if your table is like below, the measure you mentioned should work.

 

count.PNG

 

If you still need help, please share some data sample which could  reproduce your scenario so that we could help further on it.

 

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.