Forum Discussion
Runing total display
- Anonymous1 year ago
Hi fazou
Thank you very much freginier and DataNinja777 for your prompt reply.
For your question, here is the method I provided:
Here's some dummy data
“TBF_SALES”
“TBD_DATE_REFERENCE”
Create a measure.
RUNNING NET SALES SEASON = VAR CurrentWeek = MAX(TBD_DATE_REFERENCE[WEEKOFSEASON]) VAR CurrentSeason = SELECTEDVALUE(TBF_SALES[PRODUCT_SEASON]) VAR FirstSeasonWeek = MINX( FILTER( ALL(TBF_SALES), TBF_SALES[PRODUCT_SEASON] = CurrentSeason ), RELATED(TBD_DATE_REFERENCE[WEEKOFSEASON]) ) RETURN CALCULATE( SUM(TBF_SALES[NET_SALES]), FILTER( ALL(TBD_DATE_REFERENCE), TBD_DATE_REFERENCE[WEEKOFSEASON] >= FirstSeasonWeek && TBD_DATE_REFERENCE[WEEKOFSEASON] <= CurrentWeek ), TBF_SALES[PRODUCT_SEASON] = CurrentSeason, REMOVEFILTERS(TBD_DATE_REFERENCE[WEEKOFSEASON]) )Here is the result.
Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous thank you for your time 🙂
but the end result don't match what i need,in the picture below what i need to do exactly,at the moment i'm blocked 😕
what i want is when i select 24W38,the line chart display from the first week of season(here 24W36) until the selected week(here 24W38) like shown in the picture, i want to display all before the selected week !
thank you for the help
Anonymous any help please ?