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
Anonymous
Not applicable

Difference per cumulative amount

Hi,

 

 I calculate the difference saldo per month? I only have now the cumulative total saldo per month. This value increases.
DataData

Thanks,

Leon

1 ACCEPTED SOLUTION

Hi @Anonymous 

Please check below formula to get last saldo.

Column =
CALCULATE (
    SUM ( Table1[Saldo] ),
    FILTER (
        Table1,
        Table1[Cat] = EARLIER ( Table1[Cat] )
            && Table1[Index]
                = EARLIER ( Table1[Index] ) - 1
    )
)

a1.png

Regards,

Community Support Team _ Cherie Chen
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
Anonymous
Not applicable

I have added also an index column, does this help?

Hi @Anonymous 

You may try to create a column like below to get the diff.For example:

Diff =
'Table'[saldo]
    - CALCULATE (
        SUM ( 'Table'[saldo] ),
        FILTER ( 'Table', 'Table'[index] = EARLIER ( 'Table'[index] ) - 1 )
    )

a1.png

Regards,

 

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Thanks this is a good start however the diff calculation should apply to a specific category condition for which I created a specific index

 

 CAT   Saldo   Index    

CAT A;  50 ;    1

CAT A;  100;   2
CAT A;  200;   3  

CAT B:     25;    1

CAT B:      75;   2

CAT B:    100;   3

 

Thanks!

 

 

 

Hi @Anonymous 

Please check below formula to get last saldo.

Column =
CALCULATE (
    SUM ( Table1[Saldo] ),
    FILTER (
        Table1,
        Table1[Cat] = EARLIER ( Table1[Cat] )
            && Table1[Index]
                = EARLIER ( Table1[Index] ) - 1
    )
)

a1.png

Regards,

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.