Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago
Solved

Formatting Measure Results Depending Upon Calculation Type.

Hi,

I am trying to create an income statement with numbers to be formatted as numbers and percents based as percents.  The calculations work fine but I can't seem to take the % Sales as a Percent and levave the other values formatted as a decimal.  Is there a way to do this?  I am trying to use FORMAT and it doesn't seem to take.

Below is a sample of the measure.  I can post the desired look in Excel but it's basicallly an income statement with the numbers and ratios in the same colum.

Thanks!

TEST OF MATRIX ACTUALS = VAR MAXITEM2=max(MATRIX[Original Index])
RETURN
Switch(True(),
MAXITEM2=8,[Actual Net Sales],
MAXITEM2=15,[Actual Sales Cogs],
MAXITEM2=16,[Actual Sales Contribution],
MAXITEM2=17,[Actual % Sales],FORMAT([Actual % Sales],"Percent" ),
MAXITEM2=24,[Actual Cost of Goods Sold],
calculate(sum(Composite_Tbl[Composite Actuals]),
Filter(Composite_Tbl,Composite_Tbl[Composite Index]=max(MATRIX[Original Index])
  • Anonymous's avatar
    Anonymous
    1 year ago

    Never mind, I figured it out.  Use 

    MAXITEM2=17,FORMAT([Actual % Sales],"Percent"),  instead of calculating the value and then attaching the format. 

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Never mind, I figured it out.  Use 

    MAXITEM2=17,FORMAT([Actual % Sales],"Percent"),  instead of calculating the value and then attaching the format.