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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Majidbhatti
Advocate IV
Advocate IV

Get child total with parent data along with date slicer

Hi,

 

I am kind of confused to how to solve this. Below is my table structure which needs to work with the DATE SLICER which can changed by the user.

 

Annotation 2020-06-15 221212.png

 

Below is sample of what the output i am looking for. The OUTSTANDING AMOUNT is difference of TOTAL AMOUNT - SETTLED AMOUNT which is SUMED based on the "As of Date" slicer and shown in the Matrix as below

 

Moreover i want to show aging of the outstanding amount from Invoice date as below

 

Annotation 2020-06-15 222210.png

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

Hi @Majidbhatti ,

 

Cancel the relationship between date table and other two tables.

Create a relationship based on Invoice No between the invoice transactions table and the invoice Settlements table.

Create measure like this:

Measure =
VAR slicer_date =
    SELECTEDVALUE ( 'Date table'[Date] )
VAR sum_settled =
    CALCULATE (
        SUM ( 'Invoice Settlements'[Settled Amount] ),
        FILTER (
            'Invoice Settlements',
            'Invoice Settlements'[SettleDate] <= slicer_date
        )
    )
RETURN
    SUM ( 'Invoice Transactions'[Total Amount] ) - sum_settled

test_Get child total with parent data along with date slicer.PNG

Sample .pbix

 

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

2 REPLIES 2
V-lianl-msft
Community Support
Community Support

Hi @Majidbhatti ,

 

Cancel the relationship between date table and other two tables.

Create a relationship based on Invoice No between the invoice transactions table and the invoice Settlements table.

Create measure like this:

Measure =
VAR slicer_date =
    SELECTEDVALUE ( 'Date table'[Date] )
VAR sum_settled =
    CALCULATE (
        SUM ( 'Invoice Settlements'[Settled Amount] ),
        FILTER (
            'Invoice Settlements',
            'Invoice Settlements'[SettleDate] <= slicer_date
        )
    )
RETURN
    SUM ( 'Invoice Transactions'[Total Amount] ) - sum_settled

test_Get child total with parent data along with date slicer.PNG

Sample .pbix

 

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

Thanks @V-lianl-msft i had to keep the relationship between Transaction & Date to make this working otherwise it was pulling all the Transactions.

 

Any idea on how can i make the aging columns based on the "As of Date" dynamically as shown in the matrix.

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.