Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi there
I have DAX code for a one-column ("a") calculated table. See code and screenshot below.
SELECTCOLUMNS( ADDCOLUMNS( SUMMARIZE( FILTER( 'Market data - Fx rates TTM' ;'Market data - Fx rates TTM'[Fx ccy]="CNH" && 'Market data - Fx rates TTM'[Spot/outright]="Spot" && 'Market data - Fx rates TTM'[Quote type]="Mid" ) ;'Market data - Fx rates TTM'[Fx date] ) ;"x=CNH";[EUR/CNH] ) ;"a" ;[x=CNH] )
What I want to do is SUM the values of this column, i.e. Measure = sum(calculated_table[a]).
BUT, I want to do this all _in memory_, without the need of an intermediate calculated table... therefore I went ahead and put this code into a SUM function directly
sum a:= SUM( SELECTCOLUMNS( ADDCOLUMNS( SUMMARIZE( FILTER( 'Market data - Fx rates TTM' ;'Market data - Fx rates TTM'[Fx ccy]="CNH" && 'Market data - Fx rates TTM'[Spot/outright]="Spot" && 'Market data - Fx rates TTM'[Quote type]="Mid" ) ;'Market data - Fx rates TTM'[Fx date] ) ;"x=CNH";[EUR/CNH] ) ;"a" ;[x=CNH] ) )
However, this throws an error, stating that sum only takes a column reference...
How would I go about this?
Kind regards
Solved! Go to Solution.
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
64 |
User | Count |
---|---|
135 | |
120 | |
101 | |
71 | |
61 |