Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi, all.
Please help me to understand how to use iterator function.
Iterator functions such as sumx need 'table' as first argument.
But, I don't understand well that 'table' will be dealed with by function.
My understanding is that 'table' passed to function is used for deciding the scope of iteration
For example, I'll take below schema.
Based on this, I tested some measure using sumx
Solved! Go to Solution.
Hi,
A simple SUM() function should work there. You do not need a SUMX() function at all. If you realy want to use the SUMX() function, then try these measures
Total = SUM('Fact_001_Qty'[Qty])
sumx2 = SUMX(VALUES('Fact_001_Qty'[Product]),[Total])
To your visual drag Category and sumx2 measure.
I apriciate your answer.
I can get expected result as following your advise.
Could I ask additional question about it?
Why do I get that result by just using SUM function?
I think that context transition may occur, is it corret?
I mean that 'VALUES('Fact_001_Qty'[Product])' generate row text by non-repeated Product at first
and then context transiton occurs into filter context , finally SUM is calculated by Product.
I really appreciate if you could correct me if I'm wrong.
Best regards
Hi,
A simple SUM() function should work there. You do not need a SUMX() function at all. If you realy want to use the SUMX() function, then try these measures
Total = SUM('Fact_001_Qty'[Qty])
sumx2 = SUMX(VALUES('Fact_001_Qty'[Product]),[Total])
To your visual drag Category and sumx2 measure.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 49 | |
| 44 | |
| 41 | |
| 18 | |
| 18 |
| User | Count |
|---|---|
| 71 | |
| 66 | |
| 33 | |
| 32 | |
| 32 |