Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Atch
New Member

Date dax

image.jpg

 please anyone help with this dax 

 

 

@amitchandak 

3 REPLIES 3
v-zhengdxu-msft
Community Support
Community Support

Hi @Atch 

 

I try the same measure in my side, but no error.

Could you please share your data(without sensitive data), or create a set of sample data.

And describe the target you want in detail, so that we can help you better.

How to Get Your Question Answered Quickly - Page 13 - Microsoft Fabric Community

 

Best Regards,

Zhengdong Xu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 I have no option to attach it,
Date formula

DateTable = CALENDAR(DATE(2022,08,01), TODAY())

AtchayaPrabhu_0-1707499714300.png

Weekend date formula

Weekend Date = [Date] + 6 - WEEKDAY([Date], 2)

AtchayaPrabhu_1-1707499749693.png

Fiscal year formula

Fiscal Year = IF(MONTH([Date]) >= 8, YEAR([Date]) + 1, YEAR([Date]))

AtchayaPrabhu_2-1707499770637.png

date 1 formula

date 1 = IF(DateTable[Fiscal Year]=MAX(DateTable[Fiscal Year])-1,DateTable[Weekend Date]+364,DateTable[Weekend Date])

 

AtchayaPrabhu_3-1707499793263.png

Using date 1 column as a slicer in the visual

AtchayaPrabhu_4-1707499884746.png

Here you see date from 8/5/2023 to 8/3/2024 but i want to see till latest weekend date for example till  02/03/2024 , whwenever it refreshes it has to show  recent weekend date only like  tomorrow it refreshes to see 2/10/2024, in my case it shows everything till 8/3/2024..

When date 1 column sorts descending it has to show from initial date  08/05/2023 to till latest weekend date i hope this helps.. i have no option to attach my pbi file...

i have 2 accounts so replied in different account.kindly help

 

I have sensitive data 

but I can explain more 

 

I have date column from 8/1/2022 to till today 2/9/2024  , fiscal weekend column  which only weekend dates of 8/1/2022 to 2/9/2024

 

 

i have another date column using the Dax 

IF(FiscalDateTable[Fiscal Year]=MAX(FiscalDateTable[Fiscal Year])-1,FiscalDateTable[Weekend Date]+364,FiscalDateTable[Weekend Date])

Im using this date in date slicer so when I slice it has to show 2022 weekend date data , also 2023 weekend date data 

 

but it showing future weekend date also like this 

image.jpg

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

Top Kudoed Authors