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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Atch
New Member

Date dax

image.jpg

 please anyone help with this dax 

 

 

@amitchandak 

3 REPLIES 3
Anonymous
Not applicable

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.