Hello, I create a month-over-month measure from quick measures. It works, except it adds a future month, which I can't seem to filter out. How can I tell it to "ignore" February?
Hi @thjones29 ,
MoM = VAR __MONTH = SUM ( 'Table'[Value] ) VAR __PREV_MONTH = CALCULATE ( SUM ( 'Table'[Value] ), DATEADD ( 'Calendar'[Date], -1, MONTH ) ) RETURN IF ( ISBLANK ( __MONTH ), BLANK (), __MONTH - __PREV_MONTH )
Dortmund - Germany
If I answered your question, please mark my post as solution, this will also help others.
Please give Kudos for support.
If I understand this correctly, it looks like it will exclude blanks regardless of the month? Unfortunately I have "true" blanks in my data at a detail level and I want to keep those. I just want to ignore the "artificial" blanks. I guess I want it to do the filtering at the end, based on month, instead of whether is blank. Is there a way to apply the filter after all measures are computed?
Hi @thjones29 ,
but the year and the month comes from a date column.
For example, you can limit this date column to the current month with a relative date filter.
Put a filter of max date into the calculation. I do not have your calculation. But refer to my blog. The We have stopped last period to go below the first month. This is combine calc
Last Period Employee = var _min_date = minx(all('Date'),'Date'[Date]) var _Expression=if(ISFILTERED('Date'[Month Year]),maxx('Date',DATEADD('Date'[Date],-1,MONTH)),maxx('Date',DATEADD('Date'[Date],-1,YEAR))) Return CALCULATE(COUNTx(FILTER(Employee,Employee[Start Date]<=_Expression && Employee[Start Date]>=_min_date && (ISBLANK(Employee[End Date]) || Employee[End Date]>_Expression)),(Employee[Employee Id ])),CROSSFILTER(Employee[Start Date],'Date'[Date],None))
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
This will be a conference that you do not want to miss!
Don't miss the Power BI Dev Camp this week!
Check out a full recap of the month!
Check out the winners of the recent 'Can You Solve These?' community challenge!
Join us for an in-depth look at the new Power BI features and capabilities at the free Microsoft Business Applications Launch Event.