cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Ignore the extra month added by time intelligence

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?

 

Sample.PNG

7 REPLIES 7
Highlighted
Super User IV
Super User IV

Re: Ignore the extra month added by time intelligence

Hi @thjones29 ,

 

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.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

I work at KUMAVISION AG , one of the world's largest
implementation partners for Microsoft Dynamics. #BetterTogether
"Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website

Highlighted
Frequent Visitor

Re: Ignore the extra month added by time intelligence

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?

Highlighted
Super User IV
Super User IV

Re: Ignore the extra month added by time intelligence

Can't the period be simply filtered accordingly?

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

I work at KUMAVISION AG , one of the world's largest
implementation partners for Microsoft Dynamics. #BetterTogether
"Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website

Highlighted
Frequent Visitor

Re: Ignore the extra month added by time intelligence

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.

Highlighted
Super User IV
Super User IV

Re: Ignore the extra month added by time intelligence

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.

https://docs.microsoft.com/en-us/power-bi/visuals/desktop-slicer-filter-date-range#use-the-relative-...

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

I work at KUMAVISION AG , one of the world's largest
implementation partners for Microsoft Dynamics. #BetterTogether
"Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website

Highlighted
Super User IX
Super User IX

Re: Ignore the extra month added by time intelligence

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

https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

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



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Highlighted
Super User IV
Super User IV

Re: Ignore the extra month added by time intelligence

Hi @thjones29,


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.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

I work at KUMAVISION AG , one of the world's largest
implementation partners for Microsoft Dynamics. #BetterTogether
"Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website

Helpful resources

Announcements
Ignite

Microsoft Ignite

This will be a conference that you do not want to miss!

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Don't miss the Power BI Dev Camp this week!

August Community Highlights

Check out a full recap of the month!

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power BI

Join us for an in-depth look at the new Power BI features and capabilities at the free Microsoft Business Applications Launch Event.

Top Solution Authors