Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
evgeniystuchalk
Partner - Creator II
Partner - Creator II

How to make this data connection?

Hello! I have three tables:

Deals: all deals connected to it's company

Deal IDCompany
11
21
32
42

Companyes:

Company ID
1
2

Notes: each company have some notes

Note IDCompany ID
11
21
32
42

In m app i have a measure: count([DISTINCT] [Note ID]), that shows me amount of notes, that related to company.

What i want: I want see amount of notes, that related to company, when i'm selecting a Deal, related to company.

First solution in my mind, make notes table like this:

Note IDCompany IDDeal ID
111
112
211
212
323
324
423
424

How i can make it?

It also seem a little bit complicated.

Is there any way to reach it with measure formula with set analysis?

3 Replies
MindaugasBacius
Partner - Specialist III
Partner - Specialist III

You can leave the data model as it is. The tables will connect automatically via field Company ID. The association will remain while selecting data in the list.

reddy-s
Master II
Master II

Hi,

I think you will even need a set analysis statement if you link all the three tables on Company ID. All you have to do is rename the company field in the deals table to Company ID and load the three tables.

Once done, use this measure: count([Deal ID])

Dimension : Company ID -> this would show : company ID 1 has 2 deals and Company ID 2 has 2 deals

Thanks,

Sangram.

jonathandienst
Partner - Champion III
Partner - Champion III

I agree that you should load the data as is without joining. Let QV handle the associations as it is designed to. If you join the file you will create a lot of unnecessary trouble and complexity.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein