Forum Discussion
madscientist
6 years agoFrequent Visitor
Challenge with date calcs
Hi - seeking help from this great community! I am trying to prepare a table that has full quarter (QTR) and QTD information at the same time using sample data below: Data: Product Date ...
- 6 years ago
Something like this (there are many ways)
QTR=
var currQ = max(Dates[Quarter])
Return Calculate([amt],Dates[Quarter] = currQ)
lbendlin
Super User
6 years agouse CALCULATE to break out of the Month filter context but keep the Quarter filter context.
madscientist
6 years agoFrequent Visitor
Could you please share an example of what the DAX formula syntax would look like? Note that I currently do not have a filter for quarter - I only have slicers for Year and Month.
My current measures are:
QTD = calculate ([amt], datesqtd (dates))
QTR = ????
I'm hoping to avoid the need of having a slicer for quarter, as that would seem repetitive once the month is chosen.
- lbendlin6 years ago
Super User
Something like this (there are many ways)
QTR=
var currQ = max(Dates[Quarter])
Return Calculate([amt],Dates[Quarter] = currQ)