Forum Discussion
Anonymous
5 years agoNot applicable
Dax Help
Hi,
I'm trying to acumulate the total orders per costumer in a fact table. An exemplo bellow:
How could i do that?
- Anonymous5 years ago
Hi Anonymous ,
You can create a measure as below:
Measure = CALCULATE ( COUNT ( 'Table'[order_date] ), FILTER ( ALLSELECTED ( 'Table' ), 'Table'[id_store] = SELECTEDVALUE ( 'Table'[id_store] ) && 'Table'[id_customer] = SELECTEDVALUE ( 'Table'[id_customer] ) && 'Table'[id_product] = SELECTEDVALUE ( 'Table'[id_product] ) && 'Table'[order_date] <= SELECTEDVALUE ( 'Table'[order_date] ) ) )Best Regards
2 Replies
- PortrekResolver III
Hi.
You can add a new table and put the dax below
Table 2 = SUMMARIZE(Table,Table[id_costumer],Table[id_store],Table[id_product],"order",SUM(Table[Order]))best regards.
- AnonymousNot applicable
Hi Anonymous ,
You can create a measure as below:
Measure = CALCULATE ( COUNT ( 'Table'[order_date] ), FILTER ( ALLSELECTED ( 'Table' ), 'Table'[id_store] = SELECTEDVALUE ( 'Table'[id_store] ) && 'Table'[id_customer] = SELECTEDVALUE ( 'Table'[id_customer] ) && 'Table'[id_product] = SELECTEDVALUE ( 'Table'[id_product] ) && 'Table'[order_date] <= SELECTEDVALUE ( 'Table'[order_date] ) ) )Best Regards