cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

SUMA.SI.CONJUNTO in POWER BI

Hi,

I woul like to do the following in power BI, 

 

I did the desired result in Excel (SUMAR.SI.CONJUNTO) but, I would like to do it on Power BI: 

Example: 

 

Table1

Subtype 1           Subtype2             Total1      Total2

Blanco                 Azul                     300          200 

Rojo                    Rojo                     400          400

Azul                    Blanco                  200          300

Rosa                    Amarillo              600          800

Amarillo              Rosa                    800          600

Naranja              Naranja                200         200 

....                         ....                        .....            ........

....                         ....                         .......            ......

....                        .....                          .......           .........

 

 

I have the column Total1 but I would like to have the column Total 2:

 

Total 2: IF SUBTYPE1 (Blanco) =  SUBTYPE2 (Blanco) AND SUBTYPE2 (Azul)=  SUBTYPE1 (Azul ) THEN  200, PRINT IT ON THE COMBINATION Blaco  , Azul     = 200

 

Total 2 = IF SUBTYPE 1 (Rojo) = SUBTYPE 2 (Rojo) THEN TOTAL1

 

Note: i post a pic i hope i will helps 

 

 

I really apreciate your help

Subtypes1 y2.png

 

 

 

 

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

Re: SUMA.SI.CONJUNTO in POWER BI

Hi Yuliana,

 

Im sorry for the delay ... but I test it again with all my dataset and it works fine, the problem was the data  so  I will checked the data consistency.

 

Thanks a lot

 

View solution in original post

4 REPLIES 4
v-yulgu-msft Super Contributor
Super Contributor

Re: SUMA.SI.CONJUNTO in POWER BI

Hi @Anonymous ,

 

You can create a calculated column in Power BI.

Total2 =
IF (
    Data_1[Subtype1] = Data_1[Subtype2],
    [Total1],
    IF (
        LOOKUPVALUE ( Data_1[Subtype1], Data_1[Subtype1], Data_1[Subtype2] ) = Data_1[Subtype2],
        CALCULATE (
            SUM ( Data_1[Total1] ),
            FILTER (
                Data_1,
                Data_1[Subtype1] = EARLIER ( Data_1[Subtype2] )
                    && Data_1[Subtype2] = EARLIER ( Data_1[Subtype1] )
            )
        )
    )
)

1.PNG

 

Best regards,

Yuliana Gu

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

Re: SUMA.SI.CONJUNTO in POWER BI

Hi Yuliana Gu, 

 

It works fine in the example but when i replace the solution on my project it doesn´t works..  maybe it has a lot of data

I don´t know...

 

Thanks

 

 

v-yulgu-msft Super Contributor
Super Contributor

Re: SUMA.SI.CONJUNTO in POWER BI

Hi @Anonymous ,

 

Did you get any error message?

 

Regards,

Yuliana Gu

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

Re: SUMA.SI.CONJUNTO in POWER BI

Hi Yuliana,

 

Im sorry for the delay ... but I test it again with all my dataset and it works fine, the problem was the data  so  I will checked the data consistency.

 

Thanks a lot

 

View solution in original post

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 60 members 1,360 guests
Please welcome our newest community members: