-1

Team,

I'm trying to create a measure so I can pull over our Maintenance and repairs by % of revenue:

Z - Maint/Repairs % = sum('LSI DP_JP_HistorySummaryBySiteMaster'[Maint/Repairs]/[Z - JP TTM Rev. Copy])

I receive this error: 'The SUM function only accepts a column reference as an argument.'

Do you know what I'm doing wrong?

Chasity
  • 27
  • 4
  • Both answers below should work, but If I may, one little piece of advice: descriptive names! It takes a few additional seconds to type, but using descriptive names for measures, columns, datasets will save you, and anyone who might work on the same project, dozens of hours down the line when debugging or modifying. – Andrii Dec 21 '21 at 18:22

2 Answers2

1

For me it's difficult to interpret what you are doing or trying to do just with the information that's given to us. But I am going to make my guess anyway.

In any case, whatever you do or try to do, use divide() -doc- as intended in place of the / operator.

  • For operation at row level use sumx () doc.
  • Have you tryed out [my_measure] = divide( sum( [my_column] ), [my_other_measure] )?
SNR
  • 712
  • 1
  • 8
  • 22
1

I am guessing [Z - JP TTM Rev. Copy] is a measure. The reason for the error are missing parenthesis and missing syntax.

Sum('LSI DP_JP_HistorySummaryBySiteMaster'[Maint/Repairs])/([Z - JP TTM Rev. Copy])

A better Measure is this

measure =
VAR _num =
    SUM ( 'LSI DP_JP_HistorySummaryBySiteMaster'[Maint/Repairs] )
RETURN
    DIVIDE ( _num, [Z - JP TTM Rev. Copy] )
smpa01
  • 4,149
  • 2
  • 12
  • 23
  • The above was a measure and I used the sum with parenthesis, I was able to get it to work using your formula, and using mine again, but with the missing syntax. – Chasity Dec 21 '21 at 22:44