# Format the DAX Formula

• ### Question

• Hi All,

I have created a new measure in the power pivot as below

((sum(SSI[Billed])-sum(SSF[Billed]))/(sum(SSF[Billed]))), Now i want that to be

Formatted as [Blue]0.0%;[Red]-0.0%

Whether i can include the Format formula in the same Query or whether i need create a new measure?

Mahi

Thursday, June 21, 2012 1:08 PM

• Hi Mahesh,

You will not be able to format the color of your measure in PowerPivot through a DAX expression.

However as a workaround, you can use the conditional formatting feature of Excel to achieve the same (although, you might need to repeat the steps wherever the measure is used).

If you are displaying the results in a SSRS report, you can use the link that Raunak showed

Cheers,
Jason

• Marked as answer by Tuesday, July 3, 2012 11:26 AM
Thursday, June 21, 2012 5:52 PM

### All replies

• Hi Mahesh,

Text formattings are best handled at reporting layer. Like you can apply conditional logic expressions in SSRS.

Cheers, Raunak | t: @raunakjhawar | My Blog

Thursday, June 21, 2012 1:42 PM
• Hi Raunak,

Thanks for the reply. But i am not getting your point. I need a simple formula in Expersion itself. Like when i give this (((sum(SSI[Billed])-sum(SSF[Billed]))/(sum(SSF[Billed]))) ) formula, is it possible that i give like =FORMAT(((sum(SSI[Billed])-sum(SSF[Billed]))/(sum(SSF[Billed]))),[Blue]0.0%;[Red]-0.0%

Many Thanks,

Mahi

Thursday, June 21, 2012 1:51 PM
• Mahi,

Cheers, Raunak | t: @raunakjhawar | My Blog

Thursday, June 21, 2012 5:30 PM
• Hi Mahesh,

You will not be able to format the color of your measure in PowerPivot through a DAX expression.

However as a workaround, you can use the conditional formatting feature of Excel to achieve the same (although, you might need to repeat the steps wherever the measure is used).

If you are displaying the results in a SSRS report, you can use the link that Raunak showed

Cheers,
Jason