Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

AVERAGE DAX Query to round decimal

Hi everyone,

 

Bit of help, I currently have a DAX query which averages a column total however I wanted it to display the Average out of 9 for the card visual. 

 

So in the SS below I have done the Average of the column and added & "/9" so it will display the for example 3.4/9 in the card. However it displays 3.321321/9 for example. As the measure has text for "/9" I am unable to change the decimal indiciation on the Measure tools tab, as below. 

 

Unsure if I can use the ROUND function inside this query or if there is a way around it, any help would be great!

  • Hey Anonymous ,

     

    when it's only about the way you display the number, then just use the custom format. Like this, it stays a number, but the display is with a "/9" as you want it:

     

    If you need any help please let me know.
    If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
     
    Best regards
    Denis
     

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    hi Anonymous 

     

    This should work

     

    Avg_Round2 = ROUND(CALCULATE(AVERAGE('Table'[Sales])),0) & "/9"
     
    Thanks!
     
    PS: Kindly accept the post if it works! And Click the Thumbs Up if you like!!!
  • selimovd's avatar
    selimovd
    Icon for Most Valuable Professional rankMost Valuable Professional

    Hey Anonymous ,

     

    when it's only about the way you display the number, then just use the custom format. Like this, it stays a number, but the display is with a "/9" as you want it:

     

    If you need any help please let me know.
    If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
     
    Best regards
    Denis