Forum Discussion

101Mathew's avatar
101Mathew
Advocate V
5 years ago
Solved

Custom Format - via Tabular Editor (thousands)

Hi all - I'm still learning (lots), I'm having trouble getting my calculation group for current and previous year to format in thousands to this £123k, from this (£123,123.00).

 

I'm sure this is simple to do, but after reading looking online, and see possible solution I'm still unable to resolve. Could I please ask for help?

 

"£"##0,"k";-"£"##0, does not give the required results

 

Have I missed something simple, and I being simple?

 

Thank you for look at this

  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi 101Mathew ,

     

    If I understand correctly you are setting the format string expression for the Calculation Item? I believe you need to wrap the expression in quotation marks for calculation items - see Matt Allington's blog post as an example https://exceleratorbi.com.au/dynamic-formatting-of-switch-measures/

    Where the expression already has quotation marks in it I've had success replacing them with /. So for some calculation items I've had to go from "£"#,0.00;-"£"#,0.00;"£"#,0.00 to "\£#,0.00;-\£#,0.00;\£#,0.00" - I believe this would work in your example if you put the required amount of decimal places in?

     

    Not sure if that's what you are after

    Tom

11 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi 101Mathew ,

     

    If I understand correctly you are setting the format string expression for the Calculation Item? I believe you need to wrap the expression in quotation marks for calculation items - see Matt Allington's blog post as an example https://exceleratorbi.com.au/dynamic-formatting-of-switch-measures/

    Where the expression already has quotation marks in it I've had success replacing them with /. So for some calculation items I've had to go from "£"#,0.00;-"£"#,0.00;"£"#,0.00 to "\£#,0.00;-\£#,0.00;\£#,0.00" - I believe this would work in your example if you put the required amount of decimal places in?

     

    Not sure if that's what you are after

    Tom

  • FrankAT's avatar
    FrankAT
    Community Champion

    Hi 101Mathew 

    take a look at the following solution:

     

    With kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
    FrankAT (Proud to be a Datanaut)

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    101Mathew If I remember correctly when this came up before, you will need to create a measure that divides by 1000 and then use the specified format.

  • FrankAT and Greg_Deckler  - thank you both so much for your time looking at this.

     

    Your solutions works, but not quite what I'm looking for

     

    1 If I can format calculation group item, I need to affect less measure

    2 If I this can be done via calculation group script formatting, I can have my base value formatted differently

    3 Ideally I would love to get the k on the number like £123k to denote £123,123.12

     

    I thank you again for your reply (which is still very useful) 

    • Pragati11's avatar
      Pragati11
      Super User

      Hi 101Mathew ,

       

      Consider a card showing total rows as follows:

       

      Suppose I want to show the number in thousands, so I can use the format options for this visual to do so:

       

      We will something as below:

       

      This can be modified against number of decimal places as well.

       

      Is this what you are looking for?

       

      Thanks,

      Pragati

       

      • 101Mathew's avatar
        101Mathew
        Advocate V

        Pragati11  - Thank you kindly

         

        Again a solution but not one that meets the requirements.

         

        Please see my last reply

         

        Again thank you so much to helping 😉

         

        Regards,

        Mathew