Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Using Randbetween for a column level condition

I want to assign random values between 1 to 30 for a particular category "C" alone,means all other categories will have a value of 0. How can I achieve this? randnum = if('Y[Categ]="C",rand(),0),t...
  • Gordonlilj's avatar
    Gordonlilj
    6 years ago

    What error message are you getting?

     

    Otherwise if Randbetween is not working you could use something like

     

    Column = IF('Table'[Categ] = "C",RAND()*(30-1)+1,0)