Forum Discussion

DieDybi's avatar
DieDybi
Regular Visitor
3 years ago

Issue with Dynamic format strings for measures

Hi All,

 

this is my first post here and I hope I am doing it correctly. Otherwise please let me know.

My issue/ challenge is as follows:

I would like to display all results/values <1000 as is, but for all values above 1000 I want to assign/use unit Thousands. I know I could use Format(), but I still need to be able to sort columns, therefore Formats() doesn't work for me.




I read about the new feature Dynamic format strings for measures (April 2023), but couldn't implement it so far.
Any help is appreaciated.

 

Thank you very much in advance
Sabine

1 Reply

  • Hello DieDybi ,

     

    please check if this result accomodate your need.

     

    Column Rename =
    SUBSTITUTE(
        IF(
            'Table'[Sum of Data]>1000,
            FORMAT('Table'[Sum of Data]/1000,"$#,0.0K"),
            FORMAT('Table'[Sum of Data],"$#")
        ),
        ".",
        "," //substitute . to , as FORMAT use . as separator
    )
     
    Remove $ symbol it you dont need it (i am only put it as additional information).
    Please be aware, this renaming will make those number as TEXT.
     
    Hope this will help you.
    Thank you.