Forum Discussion
pfarahani
5 years agoHelper II
calculation using current month
Hi All, Is there a way to calculate a simple measure like, total count of something (filings) but in a way that it dynamically updates with the current month of the data. For example, I have this...
- 5 years ago
Hi Greg, Greg_Deckler I am having success with this:
Value on Last Year/Month =CALCULATE(COUNT( 'JBSIS Probate Filings'[Case Number] ),FILTER( 'JBSIS Probate Filings', 'JBSIS Probate Filings'[Report Year Month] = MAX( 'JBSIS Probate Filings'[Report Year Month] ) ))
pfarahani
5 years agoHelper II
Hi Greg, Greg_Deckler - my bad, I looked more closely at the data in this dashboard, its a little but different. There is this filings table, I am trying to create a measure to count total filings based on the last/max month-year in this dataset, which right now is December of 2019
Greg_Deckler
5 years agoCommunity Champion
pfarahani OK, how about this one:
Column IsCurrentMonth =
VAR __MaxYear = MAX('Table'[Report Year])
VAR __MaxMonth = MAXX(FILTER('Table',[Report Year] = __MaxYear),[Report Month])
RETURN
IF([Report Year]=__MaxYear && [Report Month]=__MaxMonth,1,0)- pfarahani5 years agoHelper II
Hi Greg, Greg_Deckler I am having success with this:
Value on Last Year/Month =CALCULATE(COUNT( 'JBSIS Probate Filings'[Case Number] ),FILTER( 'JBSIS Probate Filings', 'JBSIS Probate Filings'[Report Year Month] = MAX( 'JBSIS Probate Filings'[Report Year Month] ) ))- Greg_Deckler5 years agoCommunity Champion
pfarahani Yep, I can see how that would work too!