Forum Discussion

dokat's avatar
dokat
Icon for Post Prodigy rankPost Prodigy
4 years ago
Solved

Display units abbreviations based on dollar value

Hi,

I am trying to change number format in matrix table based on dollar value.

I have a measure that calculates sales,  [NS]

I want data to be formatted

if([NS]<100,000 return in $0,"K" Ex: $100K

if([NS]>100,000 return in $0.0,,"M" Ex: $0.7M

 

Can this be done with dax? Appreciate any help.

 

4 Replies

    • dokat's avatar
      dokat
      Icon for Post Prodigy rankPost Prodigy

      tackytechtom thanks for your response. I tried the formula but receieved the below error message. Please advise

       

      "Too few arguments were passed to the FORMAT function. The minimum argument count for the function is 2."

       

  • dokat's avatar
    dokat
    Icon for Post Prodigy rankPost Prodigy

    tackytechtom Yes it does. Thank you. I sthere anyway to get rid of the 2 decimals when it is <$100,000 and only have one decimal if it is >$500,000? also when i use the formula it removes the sorting on the column formats numbers as text string. Is there a work around this where i can still sort?

     

    Ex; $100K or $0.5M.

     

    Thanks