Forum Discussion
Seeking Help for Running Total Measure
- Anonymous5 years ago
Hi Zaky ,
You could get the result by following steps but you couldn't get the same visual if you are using two measures.
Create columns.
Week = var currentweek=WEEKNUM('Table'[Month of Return],1) var startWeek=WEEKNUM(DATE('Table'[Month of Return].[Year],'Table'[Month of Return].[MonthNo],1),1) return "week"&Currentweek-startWeek+1 month = FORMAT('Table'[Month of Return],"MMM")Create measures.
Measure = COUNTROWS('Table') Measure 2 = CALCULATE(COUNTROWS('Table'),FILTER(ALL('Table'),'Table'[Month of Return]<=MAX('Table'[Month of Return])))Result would be shown as below.
Best Regards,
Jay
Zaky , You can join the date with a date table and in date table get month week like
Start Month = STARTOMONTH('Date'[Date])
WeekDay = WEEKDAY([Date],2) //monday
Start of Week = [Date] -[WeekDay]+1 //monday
Month Week = QUOTIENT(DATEDIFF(Minx(FILTER('Date',[Start Month]=EARLIER([Start Month])),'Date'[Start of Week]),[Date],DAY),7)+1
return =countrows(Table]) //weekly return
Cumm Sales = CALCULATE(countrows(Table]),filter(allselected(date),date[date] <=max(date[date])))
- Zaky5 years agoHelper IV
Dear amitchandak
Thanks for the solution. But i don't get understand your instruction.
I would be much appreciated if you can show me the way of doing this in .PBIX example.
The data table as i attached in the link.
Thanks