Question: So I'd like to use a calculated or referenced value from another table as a y constant line in Power BI. I know there's no default way of doing it but I was wondering if there was a workaround. I have this:

[![enter image description here](https://i.stack.imgur.com/cCYTJ.png)](https://i.stack.imgur.com/cCYTJ.png)

And I want this:

[![enter image description here](https://i.stack.imgur.com/5kR5M.png)](https://i.stack.imgur.com/5kR5M.png)

The key is how to I get it to reference a value in another table or calculated column as that constant line since adding a measure isn't a feature right now. Thank you

Answer: 
From the [docs](https://reactjs.org/docs/hooks-reference.html#usestate):

> 
> Returns a stateful value, and a function to update it.
> 
> 
> 

`setvisible` is a **function**, which allows you to update the state. You would need to call it like so:

```
setvisible({visible: true});

```

Since this is as simple as a bool, and object isn't necessary here:

```
const [visible, setVisible] = useState(false)

```

Then you could simply call:

```
setVisible(true);

```

Since you're still having issues, let me make this dirt simple for you:

```
const [visible, setVisible] = useState(false)

```

And your component:

```
 <div>
    <Button type="primary" size={buttonsize.size} onClick={() => setVisible(true)}>
      Add New Project
    </Button>
    <div>

  <div>
    <Modal
      title="Add New project"
      visible={visible}
      onOk={handleOk}
      onCancel={handleCancel}
    > 
  <Input size="small"  placeholder="Project Name"  onChange={handleChange('projectName')} />
  <br />
  <br />
  <Input size="small"  placeholder="Project Number" onChange={handleChange('projectNumber')} />
  <br />
  <br />
  <Input size="small"  placeholder="Area" onChange={handleChange('area')} />
  <br />
  <br />
    </Modal>
  </div>

```
For creating hooks as single value variable, you don't have to create hooks like this..

```
const [visible, setvisible] = useState({ visible: false });

```

Instead use this...

```
const [visible, setvisible] = useState(false);

```

Here setVisible is Hooks function not an object..
So you cannot set visible value by setVisible.visible = true.
Rather you should have you write this : 

```
setVisible(true)

```

and Use visible variable as visible attribute of modal .

```
 <Modal
  ...
  visible={visible}
  ...
> 

```