Forum Discussion

wep's avatar
wep
New Member
1 year ago
Solved

Custom numeric format for column

Hello,

inside my report i have numeric measures and columns where i would like to display number in a simplified way.

For example:

  • 1.234.346€ i want to see 1,2M€
  • 12.340€ i want to see 12,3K€
  • 123€ i want to see 123€

For the measures i have managed to do so by adding the dynamic format with this code:

 

SWITCH (
    TRUE (),
    SELECTEDMEASURE () <= -1000000, "#,##0.0,,.0M€",
    SELECTEDMEASURE () <= -1000, "#,##0,.0K€",
    SELECTEDMEASURE () < 1000, "#,##0€",
    SELECTEDMEASURE () < 1000000, "#,##0,.0K€",
    "#,##0.0,,.0M€"
)
 
 

 

Now i need to do the same for a column inside a table but i cant use the dynamic format and i have to use the custom options.

Can someone suggest me a custom format to use? I have one for Excel but its not working properly here

 

 

  • Hi wep 

    SELECTEDMEASURE() only works for measures, not for columns in Power BI visuals. If you wanted to use this function on one of your measures for numeric aggregations, i found a good video from Curbal that may help you achieve this. 

     

    https://www.youtube.com/watch?v=_F4MwolGrmg

     

    Please let us know if there's a better way.

    Thanks 

    Mason

6 Replies

  • wep , Try using

     

    FormattedColumn =
    SWITCH(
    TRUE(),
    [YourColumn] >= 1000000, FORMAT([YourColumn], "0.0,,") & "M€",
    [YourColumn] >= 1000, FORMAT([YourColumn], "0.0,") & "K€",
    FORMAT([YourColumn], "0 €")
    )

    • wep's avatar
      wep
      New Member

      This is for dynamic format and it applies only to measure.

      I cant write that in the box i have posted in the last picture.

  • Hi wep 

    SELECTEDMEASURE() only works for measures, not for columns in Power BI visuals. If you wanted to use this function on one of your measures for numeric aggregations, i found a good video from Curbal that may help you achieve this. 

     

    https://www.youtube.com/watch?v=_F4MwolGrmg

     

    Please let us know if there's a better way.

    Thanks 

    Mason

  • v-achippa's avatar
    v-achippa
    Community Support

    Hi wep,

     

    Thank you for reaching out to Microsoft Fabric Community.

     

    Thank you MasonMA and bhanu_gautam for the prompt response.

     

    As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided by the user resolved your issue? or let us know if you need any further assistance.
    If any response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.

     

    Thanks and regards,

    Anjan Kumar Chippa

    • v-achippa's avatar
      v-achippa
      Community Support

      Hi @wep,

       

      We wanted to kindly follow up to check  if the issue is resolved?
      If any response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.

       

      Thanks and regards,

      Anjan Kumar Chippa

      • v-achippa's avatar
        v-achippa
        Community Support

        Hi @wep,

         

        As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided by the user resolved your issue.
        If any response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.

         

        Thanks and regards,

        Anjan Kumar Chippa