Forum Discussion

jalaomar's avatar
jalaomar
Icon for Helper IV rankHelper IV
2 years ago

Get totals as well when calculating margin based on data input

Dear all,

 

I have the following measure were I only calculate the margin if there is both Sales price and a forecast cost otherwise it returns blank. But it does not give me the totals, how can I adjust the measure so that it gives me the totals as well?

 

#33FM = VAR SelectedProject = SELECTEDVALUE('ZCV_PROJ_PROFITABILITY (2)'[sales/forecast >0])
RETURN
IF(
    SelectedProject = "1"; [#Forecast Margin2]; BLANK())
 

 

 
 

1 Reply

  • You cannot use SELECTEDVALUE in the Totals area.  Use a different aggregation like MAX, or use SUMMARIZECOLUMNS.