0

I have a table with different data in PowerBI, here an example:

Index  KPI 
 1     340980329
 2     230000

I have used the PowerBI solution to convert the "KPI" columns approximating the decimals, but it seems that we can choose either "K" or "M", obtaining:

Index  KPI 
 1     340.980K
 2     230K

but how can I use different decimal approximations according to the amount? for instance:

Index  KPI 
 1     340M
 2     230K
fflpdqqoeit
  • 65
  • 1
  • 10

1 Answers1

1

You'll need to create a custom column where you can format the numbers to display as required.

=IF('TableName'[KPI]>1000000,
    FORMAT(abc/1000000,"0.00M"),
    FORMAT('TableName'[KPI]/100000,"0.00K")
)

Note: The drawback is the data will not be numeric data type, so you cannot use it to do arithmetic operations.

Although, You can use the same logic in a measure to do arithmetic operation and then later convert the output to a string using FORMAT function

You can refer to the following articles to know more details:

Gangula
  • 5,193
  • 4
  • 30
  • 59