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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
twister8889
Helper V
Helper V

SUMX and filter help

Hi guys, 

 

I'm trying to sum values but i dont know use the sumx in this case.

 

(
CALCULATE(
SUM(table1[value1]),
FILTER(table1,
FLOOR(max(table1[date1]),0.1)<=[vDate] &&
NOT (table1[type] IN {"A","B","C"})
)
)

*
CALCULATE(
IF(
MAX(table1[value2])=1,1,max(calendar[tax])),
FILTER(table1,
FLOOR(max(table1[date2]),0.1)<=[vDate] &&
NOT (table1[type] IN {"A","B","C"})
)
)
)
the value2 is 0,00 and 1,00 

The expected result value is 3297089,00
sumx.png

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@twister8889 , You have to use some group by from your visual (Say group column)

 

a measure like

 

sumx(Values(table1[Group])
(
CALCULATE(
SUM(table1[value1]),
FILTER(table1,
FLOOR(max(table1[date1]),0.1)<=[vDate] &&
NOT (table1[type] IN {"A","B","C"})
)
)

*
CALCULATE(
IF(
MAX(table1[value2])=1,1,max(calendar[tax])),
FILTER(table1,
FLOOR(max(table1[date2]),0.1)<=[vDate] &&
NOT (table1[type] IN {"A","B","C"})
)
)
))

 

 

Also check https://www.youtube.com/watch?v=ufHOOLdi_jk

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
v-deddai1-msft
Community Support
Community Support

Hi @twister8889 ,

 

Please use something like :

 

measure1 =
(
    CALCULATE (
        SUM ( table1[value1] ),
        FILTER (
            table1,
            FLOOR ( table1[date1], 0.1 ) <= [vDate]
                && NOT ( table1[type] IN { "A", "B", "C" } )
        )
    )
        * CALCULATE (
            IF ( MAX ( table1[value2] ) = 1, 1, MAX ( calendar[tax] ) ),
            FILTER (
                table1,
                FLOOR ( table1[date2], 0.1 ) <= [vDate]
                    && NOT ( table1[type] IN { "A", "B", "C" } )
            )
        )
)

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Best Regards,

Dedmon Dai

amitchandak
Super User
Super User

@twister8889 , You have to use some group by from your visual (Say group column)

 

a measure like

 

sumx(Values(table1[Group])
(
CALCULATE(
SUM(table1[value1]),
FILTER(table1,
FLOOR(max(table1[date1]),0.1)<=[vDate] &&
NOT (table1[type] IN {"A","B","C"})
)
)

*
CALCULATE(
IF(
MAX(table1[value2])=1,1,max(calendar[tax])),
FILTER(table1,
FLOOR(max(table1[date2]),0.1)<=[vDate] &&
NOT (table1[type] IN {"A","B","C"})
)
)
))

 

 

Also check https://www.youtube.com/watch?v=ufHOOLdi_jk

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors