Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Unable to use GenerateSeries() for decimal values.

Hi All,

 

I am unable to use GenerateSeries  for decimal values. I am generating a series from -1 to 100 as below  GENERATESERIES(-1, 100, .01).

The numbers are generating the value as 2.0000009, 2.0000009, this is happening with random numbers.I am using decimal number and rouded off to 2 decimal place still I am facing this issue.
Could any one know help me on this.
  • Hi Anonymous ,

    It is by design. You could change the format of data type to decimal number. Or you could use some functions to transform the data.

    Column = ROUND('Table'[Value],2)
    
    Table 3 = SELECTCOLUMNS(GENERATESERIES(-1,100,0.1),"Values",CURRENCY([Value]))

    Reference:

    https://www.sqlbi.com/articles/generating-a-series-of-numbers-in-dax/

     

    Best Regards,

    Xue Ding

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Kudos are nice too.

2 Replies