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

I want to show items due in x amount of days

Hi

 

I have a bunch of deliverables on a spreadsheet and i want to use BI to be able to show when certain items are due based on a criteria, eg Show all items due in 7 days, 14 days, etc. HOw can this be done? 

 

Thanks in advance 

1 ACCEPTED SOLUTION
v-luwang-msft
Community Support
Community Support

Hi @Anonymous ,

Try like the below:

create a slicer :

vluwangmsft_0-1630041323456.png

Then use the below measure:

Due in the next X days - n:

DueinthenextXdays = 
CALCULATE (
    COUNT ( 'Table'[Column1] ),
    FILTER (
        ALL ( 'Table' ),
        'Table'[Column2] >= TODAY ()
            && 'Table'[Column2]
                <= TODAY () + SELECTEDVALUE ( slicer[slicer] )
    )
)

Due in next Month - n:

DueinnextMonth = 
CALCULATE (
    COUNT ( 'Table'[Column1] ),
    FILTER (
        ALL ( 'Table' ),
        IF (
            MONTH ( TODAY () ) < 12,
            MONTH ( 'Table'[Column2] )
                = MONTH ( TODAY () ) + 1
                && YEAR ( 'Table'[Column2] ) = YEAR ( TODAY () ),
            MONTH ( 'Table'[Column2] ) = 1
                && YEAR ( 'Table'[Column2] )
                    = YEAR ( TODAY () ) + 1
        )
    )
)

Overdue - n:

Overdue = CALCULATE(COUNT('Table'[Column1]),FILTER(ALL('Table'),'Table'[Column2]<TODAY()))

And if you want to view detail project ,change like below:

DueinthenextXdaysdetail = 
CALCULATE (
    MAX ( 'Table'[Column2] ),
    FILTER (
         ( 'Table' ),
        'Table'[Column2] >= TODAY ()
            && 'Table'[Column2]
                <= TODAY () + SELECTEDVALUE ( slicer[slicer] )
    )
)

Final you will get :

vluwangmsft_1-1630041455923.png

 

 

I project my pbix file  if you need.
Don't forget to give thumbs up and accept this as a solution if it helped you!!!

 

Best Regards

Lucien

View solution in original post

3 REPLIES 3
v-luwang-msft
Community Support
Community Support

Hi @Anonymous ,

Try like the below:

create a slicer :

vluwangmsft_0-1630041323456.png

Then use the below measure:

Due in the next X days - n:

DueinthenextXdays = 
CALCULATE (
    COUNT ( 'Table'[Column1] ),
    FILTER (
        ALL ( 'Table' ),
        'Table'[Column2] >= TODAY ()
            && 'Table'[Column2]
                <= TODAY () + SELECTEDVALUE ( slicer[slicer] )
    )
)

Due in next Month - n:

DueinnextMonth = 
CALCULATE (
    COUNT ( 'Table'[Column1] ),
    FILTER (
        ALL ( 'Table' ),
        IF (
            MONTH ( TODAY () ) < 12,
            MONTH ( 'Table'[Column2] )
                = MONTH ( TODAY () ) + 1
                && YEAR ( 'Table'[Column2] ) = YEAR ( TODAY () ),
            MONTH ( 'Table'[Column2] ) = 1
                && YEAR ( 'Table'[Column2] )
                    = YEAR ( TODAY () ) + 1
        )
    )
)

Overdue - n:

Overdue = CALCULATE(COUNT('Table'[Column1]),FILTER(ALL('Table'),'Table'[Column2]<TODAY()))

And if you want to view detail project ,change like below:

DueinthenextXdaysdetail = 
CALCULATE (
    MAX ( 'Table'[Column2] ),
    FILTER (
         ( 'Table' ),
        'Table'[Column2] >= TODAY ()
            && 'Table'[Column2]
                <= TODAY () + SELECTEDVALUE ( slicer[slicer] )
    )
)

Final you will get :

vluwangmsft_1-1630041455923.png

 

 

I project my pbix file  if you need.
Don't forget to give thumbs up and accept this as a solution if it helped you!!!

 

Best Regards

Lucien

parry2k
Super User
Super User

@Anonymous Read this post to get your answer quickly.

https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

@parry2k  Thanks! 

 

So as an example, i have the table below (very simple)

Deliverable A

21/08/21
Deliverable B09/09/21
Deliverable C12/12/21
Deliverable D01/01/22

 

So i want a simple dashboard widget to show -

Due in the next X days - n

Due in next Month - n

Overdue - n

 

But i need to use the current date, say 'within the next x days count how many items are due'.

 

Does this help?

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.