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
Norbertus
Helper V
Helper V

Invoice Due Date before today show in graph on today

Hi,

I have a table with invoices wiht a due date. This date can be in the past if it is not payed.
Can i make in a measure (not a calculated column) that this outstanding amount is shown for today in a graph.
Invoices that have a due date in the future must shown on the future

Of course i can make a new calculated column to check the due date and give 'today' if it is in the past. 
But is this also posible in a measure?

with kind regards


1 ACCEPTED SOLUTION
V-lianl-msft
Community Support
Community Support

Hi @Norbertus ,

 

Please try to create measure like this:

measure = CALCULATE(
    SUMX(
        FILTER('Table','Table'[End Date]<=MAX('Table 2'[Date]) && 'Table'[Status]="Outstanding"),
        ('Table'[Amount])),
    CROSSFILTER('Table'[Start Date],'Table 2'[Date],None))

Here is my sample .pbix

If the problem persists,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.

View solution in original post

5 REPLIES 5
V-lianl-msft
Community Support
Community Support

Hi @Norbertus ,

 

Please try to create measure like this:

measure = CALCULATE(
    SUMX(
        FILTER('Table','Table'[End Date]<=MAX('Table 2'[Date]) && 'Table'[Status]="Outstanding"),
        ('Table'[Amount])),
    CROSSFILTER('Table'[Start Date],'Table 2'[Date],None))

Here is my sample .pbix

If the problem persists,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.

amitchandak
Super User
Super User

@Norbertus , You can have a measure like

 

calculate([measure], filter(Table, Table[Due Date] <=today()))

unfortunately,

this will not place the the invoices in the past on today in the graph 

VAR today= NOW()

RETURN

CALCULATE(
    SUM(Debtors[amount]),
    Debtors[Status] = "Outstanding",
    FILTER(
        Debtors,
        Debtors[Invoice Due Date] <= today)
)


With a calculated column i can make a new data column and with a Userrelationship i can make a relation with the calendertable. But is this possible in a measure?

@Norbertus , use relationship and formula you shared is possible as a measure. Are you getting any error

That is not a problem..

for now i make a calculated column with a "if scenario" to calculate the new paymemnt day (today) if the invoice is overdue. With a UserRelationship i can make the graph over time.

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