cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Sachy123 Regular Visitor
Regular Visitor

DAX Date Table with only end of month for filtering

I have a date dimension DimDatei n my model 

I want to create a new table (MonthEndTable) which will have DateKey and FullDate linked to the DimDate 

So 

DimDate

DateKey FullDate Monthname Weekname .....

 

 

And

MonthEndTable

DateKey FullDate(EOM)

 

 

The FullDate(EOM) should only contain end of month date

E.g. 

if my Datedimension has got dates for 2018 

Jan, Feb.... Dec etc., (all dates)

 

then MonthEndTable should have only end of month date e.g.

 

MonthEndTable

DateKey FullDate(EOM)

22            31/01/2018

24            28/02/2018

44            31/03/2018

55           ... and so on...

 

Do we have a Dax Formula which can be used here?

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: DAX Date Table with only end of month for filtering

Hi @Sachy123

 

Try creating a new table:

 

MonthEndTable =
FILTER (
    SELECTCOLUMNS (
        DimDate,
        "DateKey", DimDate[DateKey],
        "FullDate(EOM)", DimDate[FullDate]
    ),
    [FullDate] = EOMONTH ( [FullDate], 0 )
)

 

Code formatted with   www.daxformatter.com

 

View solution in original post

1 REPLY 1
Super User
Super User

Re: DAX Date Table with only end of month for filtering

Hi @Sachy123

 

Try creating a new table:

 

MonthEndTable =
FILTER (
    SELECTCOLUMNS (
        DimDate,
        "DateKey", DimDate[DateKey],
        "FullDate(EOM)", DimDate[FullDate]
    ),
    [FullDate] = EOMONTH ( [FullDate], 0 )
)

 

Code formatted with   www.daxformatter.com

 

View solution in original post

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 107 members 1,396 guests
Please welcome our newest community members: