Hi everybody, i need your help with dax:
i have a one year data with weekly Analysis Date. So it's a historical data weekly backed up. Each analysis date is the first day of the week.
-i need to count how many persons with Status="green" were there in the last 10 weeks in each Analysis Date.
so today: go back of 10 weeks and count how many persons had Status="ok" in the period today and minus 10 weeks
17 of june: go back of 10 weeks and count how many persons had Status="ok" in the period 17 june and minus 10 weeks
i want to have this information per each analysis date. So not exactly 10 weeks ago, but in all the Analysis Dates between 10 weeks ago and the Analysis date
Any suggestion ?
Columns:ANALYSIS DATE(each monday of the week;, PERSON(id of person); STATUS(red, green,amber)
Go to Solution.
@Giavo,Create a new table using dax below.Table = CALCULATETABLE(YourTable,YourTable[STATUS]="green")Then in the new table, create the following column and measure.Column = DATE(YEAR('Table'[ANALYSIS DATE]),MONTH('Table'[ANALYSIS DATE]),DAY('Table'[ANALYSIS DATE])-70)Measure = CALCULATE(COUNTA('Table'[PERSON]),DATESBETWEEN('Table'[ANALYSIS DATE],MAX('Table'[Column]),MAX('Table'[ANALYSIS DATE])))At last, create a table visual using date field and measure of the new table.Regards,Lydia
View solution in original post
Kudos to you if you earned one of these! Check your inbox for a notification.
Learn about the award-winning innovation that was implemented across Microsoft’s Business Applications Communities.
Find out where you can attend!