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
infophyxius
Regular Visitor

Calculate balance of account with timeslicer

Hi,

 

I have a problem: 

 

I want to calculate for example the balance at the end of the day 06.05.2017, which is equal = Sum of A from Debit– Sum of A from Credit (in this case: 1000-500+8000-200).

It is possible to calculate this sum with a timeslicer?

 

DateDebitCreditSum
02.03.2017AX1000
03.03.2017XA500
05.05.2017AX8000
06.05.2017XA200
07.05.2017AX1000

 

A Account Balance 06.05.2017 = Debit A – Credit A = 1000+8000-500-200

 

Thank you,

L.

 

 

1 ACCEPTED SOLUTION
v-huizhn-msft
Employee
Employee

Hi @infophyxius,

Please create a measure using the formula:

A Account Balance 06.05.2017 =
SUMX (
    FILTER ( Table1, Table1[Date] <= DATE ( 2017, 6, 5 ) && Table1[Debit] = "A" ),
    Table1[Sum]
)
    - SUMX (
        FILTER ( Table1, Table1[Date] <= DATE ( 2017, 6, 5 ) && Table1[Credit] = "A" ),
        Table1[Sum]
    )


Then create a card visual to display the result, please see the following screenshot.

1.PNG

Best Regards,
Angelia

View solution in original post

2 REPLIES 2
v-huizhn-msft
Employee
Employee

Hi @infophyxius,

Please create a measure using the formula:

A Account Balance 06.05.2017 =
SUMX (
    FILTER ( Table1, Table1[Date] <= DATE ( 2017, 6, 5 ) && Table1[Debit] = "A" ),
    Table1[Sum]
)
    - SUMX (
        FILTER ( Table1, Table1[Date] <= DATE ( 2017, 6, 5 ) && Table1[Credit] = "A" ),
        Table1[Sum]
    )


Then create a card visual to display the result, please see the following screenshot.

1.PNG

Best Regards,
Angelia

Thank you very much!

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