Forum Discussion
jfranklin27
6 years agoFrequent Visitor
QoQ variance
Hello, I am trying to get a QoQ variance in "Tests" based on my "Actual_Start_Date" instead of just the calendar date. I created a "TestVarByYear" Measure but to get the years seperated, I filtered o...
DataZoe
Microsoft Employee
6 years agojfranklin27 You could try this measure:
Tests Prev Quarter = calculate([Tests],PREVIOUSQUARTER(Audit[Actual_Start_Date]))
https://docs.microsoft.com/en-us/dax/previousquarter-function-dax
You can create the previous year on similiarily:
Tests Prev Year = calculate([Tests],PREVIOUSYEAR(Audit[Actual_Start_Date])
https://docs.microsoft.com/en-us/dax/previousyear-function-dax
The calendar date is referenced because usually you can create a date table, and mark it as a date table, then join it to the Actual_Start_Date (provided it's a date, not datetime). Then you would simply change out Audit[Acutal_Start_Date] with the Date[Date] column in the above measures.
= CALENDAR (MINX (Audit, [Actual_Start_Date]), MAXX (Audit, [Actual_Start_Date]))