Forum Discussion

Tmatti92's avatar
Tmatti92
New Member
4 years ago
Solved

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...
  • Greg_Deckler's avatar
    Greg_Deckler
    4 years ago

    Tmatti92 Try:

    m_Total 3
    VAR __table = SUMMARIZE(Sales,[Grade],[Service],[Region],"__Value",[m_Single])
    RETURN
    IF(HASONEVALUE(sales[Region]),[m_Single],SUMX(__table,[__Value]))