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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
DevonVanDam
Helper I
Helper I

Dynamic Receivables Dashboarding (DAX)

Hello guys,

 

I am working on a for me very complex Power BI report, I have done some 'basic' Sales analysis etc, but the Dynamics are a level up for me. I'm working in Accounts Receivable and my manager wants to switch between years and weeks to see what is:

- Newly invoiced (invoice sent to customer)

- Still open

- Paid (payment received)

 

For new documents I have the attached DAX which seems to be working perfect: 

New documents = 
CALCULATE (
    DISTINCTCOUNT( Data[Document Number] ),
    FILTER (
        Data,
        Data[Posting Date] >= MIN (DateTable[Date])
        && Data[Posting Date] <= MAX (DateTable[Date])))

After this I take this measure in to the visual filter and filter on greater then 0, because it counts the documents. Any upgrades on this I am also open to that. 

 

Now I also need one that shows me which items are still open, I have something which is partially working, but it is only showing me what is open from the items posted in the week (and year) I have selected. Does anyone know how I can upgrade the below formula: 

The variables I have are:

Document number, document date, clearing document, clearing date. If there is a clearing date, it is means it is paid, but if I selected an earlier week then the clearing date, it should show the invoice as open. So it should show as open when the clearing date before the current week's dates or when the clearing date field is empty. 

Uncleared documents = 
VAR _maxDate =
    MAX ( DateTable[Date] )
VAR _minDate =
    MIN ( DateTable[Date] )
RETURN
    CALCULATE (
        DISTINCTCOUNT ( Data[Document Number] ),
        FILTER (
            Data,
            Data[Clearing date] > _minDate
                && Data[Posting Date] < _maxDate
        )
    )
        + CALCULATE (
            DISTINCTCOUNT ( Data[Document Number] ),
            FILTER (
                Data,
                ISBLANK ( Data[Clearing date] )
                    && Data[Posting Date] < _maxDate
                    && _maxDate <= TODAY ()
            )
        )

So in here I would also put this measure in the slicers and make the filter on is greater then 0.

 

Does anyone know how I can have it to show everything that is still open from prior weeks aswell?

 

Thanks,

Devon

1 ACCEPTED SOLUTION
harshnathani
Community Champion
Community Champion

Hi @DevonVanDam ,

 

You should watch this video by Enterprise DNA.

 

https://www.youtube.com/watch?v=C2fA73a8EC0

 

It contains various scenarios for account receivables.

 

Regards,

Harsh Nathani

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@DevonVanDam , check if this can help. Check prior period measures.  You have move your date table 7 dates behind using dateadd(Date[Date],-7,Day)

 

https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
harshnathani
Community Champion
Community Champion

Hi @DevonVanDam ,

 

You should watch this video by Enterprise DNA.

 

https://www.youtube.com/watch?v=C2fA73a8EC0

 

It contains various scenarios for account receivables.

 

Regards,

Harsh Nathani

@harshnathani this was really perfect, thank you very much

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors