Forum Discussion

shaykoooo's avatar
shaykoooo
Icon for Helper I rankHelper I
7 years ago
Solved

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!
  • Hi shaykoooo

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

  • Hi shaykoooo,

     

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

     

     

    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

2 Replies

  • AlB's avatar
    AlB
    Icon for Community Champion rankCommunity Champion

    Hi shaykoooo

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

  • v-piga-msft's avatar
    v-piga-msft
    Icon for Resident Rockstar rankResident Rockstar

    Hi shaykoooo,

     

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

     

     

    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