Forum Discussion

Gianfranco's avatar
Gianfranco
New Member
3 years ago
Solved

Round up

Hi,

 

coudl you please help me with the following.

I have a column that makes the below calculation:

N_Pellicole = 'commesse'[Strati] + ( ('commesse'[N_Stampe] / LOOKUPVALUE('Formati'[N_Formati];'Formati'[Formati_xls];'commesse'[formato] ) ))
 
I need to roundup this part 
( ('commesse'[N_Stampe] / LOOKUPVALUE('Formati'[N_Formati];'Formati'[Formati_xls];'commesse'[formato] ) ))
 
but return always an error? 
 
Thanks in advance 
Gianfranco 
  • Hi, 

    i tried to wrap with an IFERROR and effectively the calcualtion works. 

    I doublechecked in xls that the output figures are consistent.

     

    just one small point: what does it mean when in the formula bar the box at the end is half grey and half red ? 

     

    Thanks

    gianfranco 

     

    Thanks

    G

6 Replies

  • rsbin's avatar
    rsbin
    Community Champion

    Gianfranco ,

    Dax has a ROUNDUP function.  You can google this to get more info.  But try something like this:

    ROUNDUP( ('commesse'[N_Stampe] / LOOKUPVALUE('Formati'[N_Formati];'Formati'[Formati_xls];'commesse'[formato] ) ), 0)
    
    // This should roundup to the nearest whole number.  Replace the 0 to indicate how many decimal places you want to round to.

    Hope this helps.

    Regards,

    • Gianfranco's avatar
      Gianfranco
      New Member

      Hi

       

      thanks - I tried but I always have an error 

      The error returned is the argument of the function roundup has not correct datatype or the result is too big or too low

       

      If you can help me thanks in avance!

      G

       

      • rsbin's avatar
        rsbin
        Community Champion

        Gianfranco ,

        In order to help you better, please post a few rows of sample data for each of your two tables 'Comesse' and 'Formati'.  Do not include any sensitive data.