• Skip to main content
  • Skip to footer

Curbal

Learn how to grow your business with your data and Power BI

  • Resources
    • DAX Glossary
    • Download Center
    • Template Apps
    • Data Stories Gallery
    • Solution Gallery
    • Learning Resources
  • Courses
    • Introduction to Power BI – FREE Online course
    • Power Query Online Training for Power BI
    • M Language Online Course: The unofficial and Practical Reference Guide
  • Blog
  • Shop
    • Courses
    • Swag
    • Template Apps
    • Donations
  • Cart
  • Register/ Log In
    • Become a Member
    • Log In
    • My account
    • My Courses
  • Contact
You are here: Home / CM Tooltip Glossary Pro+ / PREVIOUSMONTH

PREVIOUSMONTH

posted on April 20, 2018

« Back to Glossary Index

Syntax

PREVIOUSMONTH(<dates>)

Tutorial with example

In today’s video I we will go through how to build a time intelligence measure in DAX using the PREVIOUSDAY, PREVIOUSMONTH, PREVIOUSQUARTER, PREVIOUSYEAR.

We will first go through PREVIOUSYEAR DAX function and explain how can those functions can be combined with CALCULATE to create the correct measure.

We move on to PREVIOUSQUARTER DAX functionwhere we go through how to that measure works and create an example.

Next will be PREVIOUSMONTH DAX function where we go through what the “first day in the current context” means.

And finally we go through PREVIOUSDAY DAX example where we go through what happens when we dont have continuous days in our sales table.

Keynotes:

01:48 PREVIOUSYEAR

04:05 PREVIOUSQUARTER

05:24 PREVIOUSMONTH

06:41 PREVIOUSDAY

Download example file:

Link to file

Remarks

This function returns all dates from the previous month, using the first date in the column used as input. For example, if the first date in the dates argument refers to June 10, 2009, this function returns all dates for the month of May, 2009.

The dates argument can be any of the following:

  • A reference to a date/time column.
  • A table expression that returns a single column of date/time values.
  • A Boolean expression that defines a single-column table of date/time values.

 

This DAX function is not supported for use in DirectQuery mode.

Was this helpful?
[Total: 3   Average: 3.7/5]
See Also:
  • PREVIOUSDAY
  • PREVIOUSQUARTER
  • PREVIOUSYEAR
« Back to Index

Reader Interactions

Let us know your thoughts... Cancel reply

Footer CTA

Join our community of +20,000 professionals

Become a Member

Subscribe to YouTube

About us

Curbal AB
Kopparbergsvägen, 10
722 13 – Västerås
Sweden

OrgNo: 5569680852 | VAT: SE556968085201

 

Location:

© Copyright 2014-2021 · Curbal AB · All Rights Reserved · Privacy Policy · Terms of Service · Refund Policy · Log In