Forum Discussion
Migration calculated columns to measure
- 6 years ago
Hi Lidou_Cand ,
It is really hard to say,the result of calculated column is effected by row context and can't be variable, but the result of measure is effected by row context and filter context,it can be variable.
It's hard to tell just by the two formulas you gave us. And in my opinion, these two formulas are somewhat different in allexcept.
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
Lidou_Cand ,Not very clear. the measure is dependent on rows context.
But you can a replicate column like
Column = [Col1]*[Col2] //aggregation - sum
Measure = Sumx( Table, [Col1]*[Col2])
If you can share some calculation we can suggest measures
https://www.sqlbi.com/articles/calculated-columns-and-measures-in-dax/
- Lidou_Cand6 years ago
Helper III
Hello amitchandak and Greg_Deckler
Thank you for your help.
For example, I migrated these 2 calculated columns.
1- MOD_DURATION: This column [MOD_DURATION] was a numeric column and I migrated in a Measure like this: SUM([MOD_DURATION])
2- Exposure:This column had this expressionDIVIDE(Ptf[Exposure Amt Ptf Ccy],CALCULATE(sum(Ptf[Asset Val]),ALLEXCEPT(Ptf,Ptf[Fund Name (groups)],Ptf[Date])),0)
And I migrated in Analysis Service like this: DIVIDE([Exposure Amt Ptf Ccy],CALCULATE([Asset Val],ALLEXCEPT(Fund,Fund[Fund Name Parent])),0)
And I have differents results between PowerBI measures and Analysis Service Measure
- v-deddai1-msft6 years ago
Community Support
Hi Lidou_Cand ,
It is really hard to say,the result of calculated column is effected by row context and can't be variable, but the result of measure is effected by row context and filter context,it can be variable.
It's hard to tell just by the two formulas you gave us. And in my opinion, these two formulas are somewhat different in allexcept.
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