AmiV
AmiV

Reputation: 1

Trying to get 0 as minimum value vertical axis in chart of SSRS

I am working on a SSRS report which requires a chart to show vertical axis in 'M' or 'K' like 0, 2M, 4M. I got a custom formatting formula which adds an 'M' or 'K' with numbers -

=Switch(Fields!TotalSpendCurrent.Value < 1000, "0.#", Fields!TotalSpendCurrent.Value < 1000000, "#,.#K", true, "#,,M")

But with this I am getting 'M' or 'K' as minimum value not 0.

enter image description here

Current Output Screen

enter image description here

Upvotes: 0

Views: 190

Answers (1)

Pedram
Pedram

Reputation: 6498

Try this,

=Switch(CInt(Fields!TotalSpendCurrent.Value) < 1000, Format(Fields!TotalSpendCurrent.Value,"0.#"), 
CInt(Fields!TotalSpendCurrent.Value) < 1000000, Format(Fields!TotalSpendCurrent.Value,"#,.#K"), 
true, Format(Fields!TotalSpendCurrent.Value,"#,,M"))

Let me if it works or not!

Upvotes: -1

Related Questions