Reply
Regular Visitor
Posts: 29
Registered: ‎02-28-2018
Accepted Solution

DAX Date Table with only end of month for filtering

[ Edited ]

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?

 


Accepted Solutions
AlB Super Contributor
Super Contributor
Posts: 1,195
Registered: ‎11-12-2018

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

[ Edited ]

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


All Replies
AlB Super Contributor
Super Contributor
Posts: 1,195
Registered: ‎11-12-2018

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

[ Edited ]

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