Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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 @Anonymous,
is your problem solved?
If we answered your question, please mark a post as solution, this will also help others.
Please give Kudos for support.
Hi @Anonymous ,
check this
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 )
Regards,
Marcus
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?
Can't the period be simply filtered accordingly?
I have't been able to because, for example, February is not in my filters because I have no february data. It created february on its own.
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 -
https://community.powerbi.com/t5/Community-Blog/Winner-Topper-on-Map-How-to-Color-States-on-a-Map-wi...
https://community.powerbi.com/t5/Community-Blog/Power-BI-Working-with-Non-Standard-Time-Periods/ba-p...
https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601
Hi @Anonymous ,
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.
User | Count |
---|---|
125 | |
108 | |
99 | |
63 | |
62 |
User | Count |
---|---|
135 | |
116 | |
101 | |
71 | |
61 |