Forum Discussion
Anonymous
5 years agoNot applicable
Profit Margin
Hi there, i am working with summary data and im tyring to calculate Profit Margin which is called "EM" in my data model. The calculation itself is correct but the total is not. I would like it t...
- 5 years ago
Anonymous Try:
m_Total 3 VAR __table = SUMMARIZE(Sales,[Grade],[Service],[Region],"__Value",[m_Single]) RETURN IF(HASONEVALUE(sales[Region]),[m_Single],SUMX(__table,[__Value]))
Anonymous
5 years agoNot applicable
Greg_Deckler Hi Greg thanks for your reply. I am still seeming to struggle with calculating the % i have tried using your thread but am still having some errors.
firstly i tried this:
m_Single = SUM(Sales[EM])
Then secondly this
m_Total 3
VAR __table = SUMMARIZE(Sales,[EM],[m_Single])
RETURN
IF(HASONEVALUE(sales[em]),[m_Single],SUMX(__table,[em]))
Would be great if you could point out my error. As i can imagine it's an easy fix which i am not seeing.
Regards,
Thomas
Greg_Deckler
Community Champion
5 years agoAnonymous Try:
m_Total 3
VAR __table = SUMMARIZE(Sales,[Grade],[Service],[Region],"__Value",[m_Single])
RETURN
IF(HASONEVALUE(sales[Region]),[m_Single],SUMX(__table,[__Value]))