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
jlynch
Frequent Visitor

Show Days between TODAY and a future date - based on a filter?

I am trying to show how much time is available for work per person between today and a floating deadline - CPA firm needs to know hours commited vs hours available to work.

 

I have added a Dates table, with a column for weekday (1/0) and created a relationship between the date column and the date in the table being used for the filter.  I created a measure in the table being used for the filter that has sum(dates[weekday]) as the formula and I only get the total of all dates, not the filtered sum of dates -

 

What am I doing wrong and what other information might help me solve this?

2 REPLIES 2
AlexChen
Employee
Employee

Hi,

 

I assume you have 2 tables: work and weekInfo. See screenshot below.

 

1.png

 

2.png

 

create relationships between these 2 tables:

 

 

5.png

 

create a column called “remainWorkingDays “ in “work” table:

 

remainWorkingDays = COUNTAX(Filter(weekInfo, weekInfo[date] >= TODAY() && weekInfo[date] <= 'work'[deadline] && weekInfo[weekday] = 1), weekInfo[weekday])

 

And you will see the result:

 

4.png

 

Best Regards

Alex

 

 

 

 

CheenuSing
Community Champion
Community Champion

@jlynch

 

Can you provide sample data and the output desired to come out with a solution.

 

Cheers

 

CheenuSing

 

 

Did I answer your question? Mark my post as a solution and also give KUDOS !

Proud to be a Datanaut!

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.

Top Solution Authors
Top Kudoed Authors