Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

[Bug] Number.Random is not random.

Hi PBPQ team,

 

I found a strange behavious which seems a bug to me.

 

Number.Random doesn't work in the correct way when used inside Table.Group or Table.TransformColumns.

 

- Expected behaviour:

Two table with column random_number containing different random value

 

- Real behaviour:

Two table with a column random_number containing the same value

 

stenford23_0-1658479635597.png

 

Until the last update i never see this behaviour and Number.Random was working correctly.

 

The following link contains the sample pbix to reproduce the bug

Dropbox to example Pbix 

Status: Investigating

Hi @stenford23 

The random columns of these two tables are regular columns. How did you get the different data? What is your data source?

 

Best Regards,
Community Support Team _ Ailsa Tao

Comments
v-yetao1-msft
Community Support
Status changed to: Investigating

Hi @stenford23 

The random columns of these two tables are regular columns. How did you get the different data? What is your data source?

 

Best Regards,
Community Support Team _ Ailsa Tao

stenford23
Helper I

Hi @v-yetao1-msft 

 

This is a sample dataset (hand made data) to reproduce the bug. I found this bug when working with excel file.

 

The table are generated in the following way:

 

- Grouped Random (generate a table with following value [1, 2, ..., 10])

 

let
Source = #table(type table [Column = number], {{1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}, {10}}),
grouped = Table.Group(
Source, "Column",
{{"random_number", each Number.Random(), type number}}
)

in
grouped

 

- Transform Random (refers to previous dataset and apply a transformation):

 

let
    Source = Table.TransformColumns(grouped_table, {"random_number", each Number.Random(), type number})
in
    Source

 

In both cases until last month i was able to generate random number inside Table.Group and Table.TransformColumns. Now it's not working anymore.

 

In the link you can find the pbix with the two queries.

 

https://www.dropbox.com/s/mwajc4k6od6vgjd/bug_random_number.pbix?dl=0