Forum Discussion

SergioTorrinha's avatar
SergioTorrinha
Resolver II
5 years ago
Solved

Cumulative Count Not working as expected

Hi all,   My data model is composed , amongst other tables, by an Orders table (facOrder) and a dimensional customer table (dimCustomer). These 2 tables are linked by customerID key.   I wrote a...
  • amitchandak's avatar
    5 years ago

    SergioTorrinha , Not very clear.

     

    Try like

    calculate(counrows(facOrders), filter(allselcted(facOrders) , facOrders[CreationDate] <=Max(facOrders[CreationDate])))

    or

    calculate(counrows(facOrders), filter(allselcted(facOrders) , facOrders[CreationDate] <=Max(facOrders[CreationDate]) && facOrders[CustomerID] <=Max(facOrders[CustomerID])))