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
jmcph
Helper III
Helper III

Computing Overdue based on filtered dates

Hi,

I am trying to compute for Overdue balance using the this measure : 

Measure.JPG

However, i encountered a problem with my monthly filters, when i pick a month that has no Collection, my measure doesnt seem to work. In the picture below, i filtered to December 2018 which shows no result (which i expect to return a 800 Overdue value). 


Dec.JPG 

When i filtered in to Nov 2018, it works just fine. The last Collection was Jan 2019, and when selected, it works as well. I inserted my measures for the Lastcollectdate and Maturity date which i think caused my problem

Collect.JPG
Max.JPG

 

Thank you for taking time on this query! Feel free to correct me and I hope that you can help me with this! 

 

 

1 ACCEPTED SOLUTION
v-xicai
Community Support
Community Support

Hi @jmcph ,

 

You may change your formula like DAX below, which use the ALLSELECTED function to take effect of slicer filter, do the same with measure [MatDate] to replace ALL function.

 

Overdue=Sumx(ALLSELECTED(Masterlist), if…)

 

In addition, you may create Calendar table , and use it in your formula which need to use time intelligence. For example, you may use " DATEADD(Calendar[Date], 60, DAY) "  instead of " Masterlist[Date]+60"

 

Calendar= CALENDARAUTO()

 

Or could you share some data sample and expected output? You can upload it to OneDrive and post the link here. Do mask sensitive data before uploading.

 

How to Get Your Question Answered Quickly

 

Best Regards,

Amy 

 

Community Support Team _ Amy

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

4 REPLIES 4
v-xicai
Community Support
Community Support

Hi @jmcph ,

 

You may change your formula like DAX below, which use the ALLSELECTED function to take effect of slicer filter, do the same with measure [MatDate] to replace ALL function.

 

Overdue=Sumx(ALLSELECTED(Masterlist), if…)

 

In addition, you may create Calendar table , and use it in your formula which need to use time intelligence. For example, you may use " DATEADD(Calendar[Date], 60, DAY) "  instead of " Masterlist[Date]+60"

 

Calendar= CALENDARAUTO()

 

Or could you share some data sample and expected output? You can upload it to OneDrive and post the link here. Do mask sensitive data before uploading.

 

How to Get Your Question Answered Quickly

 

Best Regards,

Amy 

 

Community Support Team _ Amy

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

It actually solved my problem. Thank you very much! 

Greg_Deckler
Super User
Super User

@jmcph Sorry, having trouble following, can you post sample data as text and expected output?


Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
VijayP
Super User
Super User

@jmcph 

I suggest to Create DateDim Table and connect with your FACT Table ,

Use Calculate along with SUMX .Then you will achieve. Currently you are dealing with dates within the fact Table it seems.

 

 




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


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.