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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
nogstavo
Frequent Visitor

IF and Summarizing not showing the totals

Hello guys,

 

I'm trying my best as far as my knowledge goes to solve an issue I am having:

 

Objective: "Sold IF" should only show the "Sold QTY" if "Value" is blank

nogstavo_1-1676502358738.png

 

The issue: I can seem to bring the values on a row context, but no success in summing the totals from "Sold IF".

 

Sold IF = 

VAR Sold_Quantities =

IF( [Value] <> BLANK(), BLANK(),
 [Sold QTY]
)

Var calculo = 

    SUMMARIZE(
        factExample,
        factExample[Data],       
        "@Totals",
        Sold_Quantities 
    )


RETURN SUMX(calculo, [@Totals])

 

I would gladly appreciate anyone that can help me with this.

1 ACCEPTED SOLUTION

@nogstavo 
Assuming [Value] and [Sold QTY] are measures then I see no reason for the following not to work

Sold IF =
SUMX (
    VALUES ( dimProductos[SKU] ),
    IF ( [Value] <> BLANK (), BLANK (), [Sold QTY] )
)

View solution in original post

8 REPLIES 8
tamerj1
Super User
Super User

Hi @nogstavo 

please try

Sold IF =
SUMX (
VALUES ( factExample[Data] ),
IF ( [Value] <> BLANK (), BLANK (), [Sold QTY] )
)

Thank you very much for your reply.

 

I've tried your syntax but it did not work, unfortunately.

 

The totals are still blank.

@nogstavo 
SKU column is from which table?

DimSKU is from this table:

nogstavo_0-1676546900119.png

Due to testing, I have created a many-to-many relationship, which I know is not a good practice.

@nogstavo 
Assuming [Value] and [Sold QTY] are measures then I see no reason for the following not to work

Sold IF =
SUMX (
    VALUES ( dimProductos[SKU] ),
    IF ( [Value] <> BLANK (), BLANK (), [Sold QTY] )
)

That worked, thank you very much!!!

I'll study your syntax so that I can learn more.

wdx223_Daniel
Super User
Super User

Sold IF =
SUMX (
    SUMMARIZE ( factExample, factExample[Data] ),
    IF ( [Value] <> BLANK (), BLANK (), [Sold QTY] )
)

Thank you very much for your reply.

 

I've tried your syntax but it did not work, unfortunately.

 

The totals are still blank.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.