Forum Discussion
JoaoTrindade
7 years agoFrequent Visitor
cumulative by group
Hi, I'm trying to do a cumulative sum by group. I've tried different solutions but none seems to work. I have a table with millions of entries of booking made and they all are grouped by channel gr...
- 7 years ago
JoaoTrindade here is the measure
cumulative nights = CALCULATE( [total nights], FILTER( ALLSELECTED('gc_reports bookings'[book_date].[Date]), 'gc_reports bookings'[book_date].[Date] <= MAX ('gc_reports bookings'[book_date].[Date]) ) )also I noticed there is lot of both direction cross filter in your model whcih is a bad idea. anyhow that is seperate topic.
parry2k
Super User
7 years agoJoaoTrindade not sure if you need allselected in this measure
nr_nights total for group = SUM('gc_reports bookings'[nr_nights])- JoaoTrindade7 years agoFrequent Visitor
that filed is a Quick Mesure of total of nights grouped by channel Group. That is the code that comes out of the quick mesure .
- parry2k7 years ago
Super User
JoaoTrindade did you changed it as I suggested?
- JoaoTrindade7 years agoFrequent Visitor
I did now but it did did not change anything