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
Syndicate_Admin
Administrator
Administrator

Subtract two columns to get progression

Good morning

I have a matrix that looks like this. Each value Loaded, Contacted, % Contact... are measures that are in the Values field in the matrix. I need to get a new column with the difference of the Current - Close column, i.e. Current Loaded - Closed Loaded etc.

alvaro_arr_0-1687938167875.png

To try to get something like that

alvaro_arr_1-1687938352239.png

Is there any way to get what I need?

Thank you all very much

1 ACCEPTED SOLUTION
v-yanjiang-msft
Community Support
Community Support

Hi @Syndicate_Admin ,

According to your description, here's my solution.

1.Create a new table with a single column, create relationship with the fact table.

vyanjiangmsft_0-1688111130016.png

2.Create new measures or directly modify the original measures.

Contactados2 =
IF (
    MAX ( 'New'[New Column] ) = "Prog",
    CALCULATE (
        [Contactados],
        FILTER ( ALL ( 'Table' ), 'Table'[Column] = "Actual" )
    )
        - CALCULATE (
            [Contactados],
            FILTER ( ALL ( 'Table' ), 'Table'[Column] = "Cierre" )
        ),
    [Contactados]
)
Aceptotas2 =
IF (
    MAX ( 'New'[New Column] ) = "Prog",
    CALCULATE (
        [Aceptotas],
        FILTER ( ALL ( 'Table' ), 'Table'[Column] = "Actual" )
    )
        - CALCULATE (
            [Aceptotas],
            FILTER ( ALL ( 'Table' ), 'Table'[Column] = "Cierre" )
        ),
    [Contactados]
)

Get the correct result:

vyanjiangmsft_1-1688111438555.png

I attach my sample below for your reference.

 

Best regards,

Community Support Team_yanjiang

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
Syndicate_Admin
Administrator
Administrator

I was on vacation and hadn't seen the answer.

Thank you you have solved the problem I had

v-yanjiang-msft
Community Support
Community Support

Hi @Syndicate_Admin ,

According to your description, here's my solution.

1.Create a new table with a single column, create relationship with the fact table.

vyanjiangmsft_0-1688111130016.png

2.Create new measures or directly modify the original measures.

Contactados2 =
IF (
    MAX ( 'New'[New Column] ) = "Prog",
    CALCULATE (
        [Contactados],
        FILTER ( ALL ( 'Table' ), 'Table'[Column] = "Actual" )
    )
        - CALCULATE (
            [Contactados],
            FILTER ( ALL ( 'Table' ), 'Table'[Column] = "Cierre" )
        ),
    [Contactados]
)
Aceptotas2 =
IF (
    MAX ( 'New'[New Column] ) = "Prog",
    CALCULATE (
        [Aceptotas],
        FILTER ( ALL ( 'Table' ), 'Table'[Column] = "Actual" )
    )
        - CALCULATE (
            [Aceptotas],
            FILTER ( ALL ( 'Table' ), 'Table'[Column] = "Cierre" )
        ),
    [Contactados]
)

Get the correct result:

vyanjiangmsft_1-1688111438555.png

I attach my sample below for your reference.

 

Best regards,

Community Support Team_yanjiang

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.