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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

DAX multiple iterator issue

Hello

 

I have a very strange behaviour which I hope someone on the forum can help me with.

 

I have a measure that consists of three nested SUMX () functions.

which looks something like this

SUMX (
    VALUES ( Table[Column1] ),
    SUMX (
        CALCULATETABLE ( [Table Expression], Table[Type] = "A" ),
        SUMX ( 
            CALCULATETABLE ( [A different Table Expression], Table[Type] = "B" ), 
            [Measure]
        )
    )
)

This measure is returning blank however if I swap all the SUMX for CONCATANATEX I get the value you want but as a string. I can even Change it to a SUMX ( VALUE ( CONCATANATEX ( SUMX () ) ) ) and it will work in some scenarios. I have already tried using VALUE () within the SUMX iterators to force type conversion even though that shouldnt be required and it did not solve the issue.

 

Has anyone run into a similar situation where the logic works in CONCATANATEX but not in anyother iterator?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I managed to solve the issue by moving the filters to the report page and then just using a calculate table with no extra filters on the second SUMX 

View solution in original post

3 REPLIES 3
OwenAuger
Super User
Super User

@Anonymous 

That seems strange - I can't say I've seen this issue before.

 

If you simply replace all occurrences of SUMX with CONCATENATEX, then exactly the same tables are being iterated and the final concatenated string should contain the values being summed in the original measure.

 

Could you post a santised pbix file exhibiting the issue?


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
LinkedIn
Anonymous
Not applicable

Hello Owen,

 

I have uploaded the file here 

https://www.dropbox.com/s/8vi33va0778q22k/SUMX%20Issue.pbix?dl=0 

 

In the file I have created an example table 

IdSiteProductDowntime startDowntime end
1Site APrimary Product2019-01-01 03:002019-01-01 04:00
2Site ABackup Product2019-01-01 02:002019-01-01 05:00
3Site ABackup Product2019-01-02 03:002019-01-02 06:00

 

Then I have five measures.

The first is distinct product count which is what you think it is.

The second is a simple SUMX that works out the difference in seconds for all the rows in context and sums them. 

The rest of the measures are all variations of the same pattern. What I want is a measure that will calculate for the site in context what is the total amount of time where both the primary and backup were down.

The three versions of this just change the iterator, there is one with SUMX which returns BLANK, there is one with CONCATENTATEX which returns 36000 which is 3600 appended with 0 which is what I would expect. The final measure is a combination of SUMX and CONCATENTATEX which uses the VALUE function. This one reuturns a correct numeric result of 3600. However this is not a scaleable solution it just works in this subset of data. 

Anonymous
Not applicable

I managed to solve the issue by moving the filters to the report page and then just using a calculate table with no extra filters on the second SUMX 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors