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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Next 7 days , 14 days , 21 days

Hi All,

Below is my data.

 

I want to find out what what all "open" Status for next 7 days , 14 days and 21 days from <hard_coded_date>

Date.PNGStatus.PNG

1 ACCEPTED SOLUTION

Hi @Anonymous ,

 

According to the data you provided, I got the expected result.

test_next_7days.PNG

I mean drag measure to visual level filter, not to table chart.

Sample .pbix

 

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

View solution in original post

9 REPLIES 9
amitchandak
Super User
Super User

@Anonymous 

From the date in the slicer

next 7 day = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date Filer],MAX(Sales[Sales Date]),7,Day))  
next 14 day = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date Filer],MAX(Sales[Sales Date]),14,Day)) 
next 21 day = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date Filer],MAX(Sales[Sales Date]),21,Day)) 

Last 7 day = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date Filer],MAX(Sales[Sales Date]),-7,Day)) 

 

Anonymous
Not applicable

Hi , 

 

Thanks for your rpl !!

 

 

I dont have a sales column, I have status coloum. I need to know which all the ID that status are open for next 7 days 

Can you share sample data and sample output.

Anonymous
Not applicable

neData is alreday share.

Next 7 days (includes today).

Date Column is today.. its fine if I dint get date. I want to display ID numbers which are Open for next 7 days

IDDateDue_DateStatus
ABCD12304/06/202004/06/2020Open
aaaa04/06/202005/06/2020Open
ccc04/06/202006/06/2020Open
cvdfc04/06/202007/06/2020Open
aafaf04/06/202008/06/2020Open
    
    
    

Hi @Anonymous ,

 

Create a measure like this and use it as visual level filter:

Measure = 
var _date = IF(ISBLANK(MAX('table'[Date])),TODAY(),MAX('table'[Date]))
return IF(MAX('table'[Status])="open"&&_date<=TODAY()+7&&MAX('table'[Due_Date])>=TODAY()+7,1)

Sample .pbix

 

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

Anonymous
Not applicable

Hi ,

 

Thanks for your rpl.

 

I am getting the error.

Error.PNG

Hi @Anonymous ,

 

Could you share the sample pbix via cloud service like onedrive for business?

 

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

Anonymous
Not applicable

Please share your gmail id

Hi @Anonymous ,

 

According to the data you provided, I got the expected result.

test_next_7days.PNG

I mean drag measure to visual level filter, not to table chart.

Sample .pbix

 

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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