0% found this document useful (0 votes)
94 views8 pages

Fiscal Year - DAX Guide

The document describes steps to create a fiscal year calendar table in DAX using various functions. It explains how to: 1. Use the CALENDARAUTO function to automatically generate a date table based on the fiscal year end month. 2. Extract the month name using the FORMAT function. 3. Add a month sort order column using the EDATE function to set April as the first month. 4. Add a fiscal year quarter column by combining the EDATE and QUARTER functions. 5. Add a fiscal year column using the SWITCH and RIGHT functions to display the last two digits of the year. Following these steps results in a table with date, month, month sort
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
94 views8 pages

Fiscal Year - DAX Guide

The document describes steps to create a fiscal year calendar table in DAX using various functions. It explains how to: 1. Use the CALENDARAUTO function to automatically generate a date table based on the fiscal year end month. 2. Extract the month name using the FORMAT function. 3. Add a month sort order column using the EDATE function to set April as the first month. 4. Add a fiscal year quarter column by combining the EDATE and QUARTER functions. 5. Add a fiscal year column using the SWITCH and RIGHT functions to display the last two digits of the year. Following these steps results in a table with date, month, month sort
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Easiest

way to create
FISCAL YEAR
Calendar Table
SWIP
DAX FORMULAS

DAX Functions to be Used! Expected Outcome

1. CALENDARAUTO
2. FORMAT
3. EDATE
4. SWITCH
5. MONTH & QUARTER
6. YEAR
7. RIGHT

FOLLOW
https://www.linkedin.com/in/rajendrakumaroram/
SWIP
STEP-1: CREATE A TABLE

DAX Functions to be Used!


1. CALENDARAUTO
Description: Returns a table with a single column named "Date" that contains a contiguous
set of dates. The range of dates is calculated automatically based on data in the model.

Syntax: CALENDARAUTO([fiscal_year_end_month])

Formula to Create Table Sample Output

Table with Date


CALENDARAUTO(3), #3 is used in bracket, so that column will be
month will start from April not January (Based on India created.
context, FY start from April to March).

FOLLOW
https://www.linkedin.com/in/rajendrakumaroram/
SWIP
STEP-2: EXTRACT FY MONTH

DAX Functions to be Used!


2. FORMAT
Description: Converts a value to text according to the specified format.

Syntax: FORMAT(<value>, <format_string>[, <locale_name>])

Formula to Create Month Column Sample Output

“MMM” used to get Short Name of months like Jan, Feb,


etc. If it is used four times “MMMM”, It’ll give full months
name.

FOLLOW
https://www.linkedin.com/in/rajendrakumaroram/
SWIP
STEP-3: MONTH SORT ORDER

DAX Functions to be Used!


3. EDATE
Description: Returns the date that is the indicated number of months before or after the
start date. Use EDATE to calculate maturity dates or due dates that fall on the same day of
the month as the date of issue.

Syntax: EDATE(<start_date>, <months>)

Formula to Create Month Sort Order Column Sample Output

By using EDATE function we can forward/backward the


month in time, like here -3 is used to mark April as no. 1
by joining MONTH function to get the month no.

FOLLOW
https://www.linkedin.com/in/rajendrakumaroram/ SWIP
STEP-4: FY QUARTER

DAX Functions to be Used!


4. QUARTER
Description: Returns the quarter as a number from 1 (January – March) to 4 (October – De-
cember).

Syntax: QUARTER(<date>)

Formula to Create FY Quarter Column Sample Output

By using EDATE function we can forward/backward the


month in time, like here -3 is used to mark April as no. 1
by joining QUARTER function to get the quarter no. and
“Q” in the begining is used to get the result like Q1, Q2,
etc.

FOLLOW
https://www.linkedin.com/in/rajendrakumaroram/
SWIP
STEP-5: FY YEAR

DAX Functions to be Used!


5. VAR 6. SWITCH
Description: Stores the result of an expression as a named Description: Evaluates an expression
variable, which can then be passed as an argument to other against a list of values and returns one of
measure expressions. Once resultant values have been calcu- multiple possible result expressions.
lated for a variable expression, those values do not change,
even if the variable is referenced in another expression. Syntax: SWITCH(<expression>, <value>,
<result>[, <value>, <result>]…[, <else>])
Syntax: VAR <name> = <expression>

Formula to Create FY Year Column RIGHT function allow us get last char-
acter based on the input. Here 2 is
specified to get last 2 character of
year like 12,13, etc.

To get last year, -1 used after the


date and to get coming year +1 used.

FOLLOW
https://www.linkedin.com/in/rajendrakumaroram/
SWIP
FINAL RESULT

FOLLOW FOR MORE TIPS

Linkedin: https://www.linkedin.com/in/rajendrakumaroram/

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy