Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

Disconnected table and relationship table: Display 2 Measures on table visual?

Hi there,

 

Need help please.

 

I am trying to place 2 measures on a table visual with the common dimension being the date field of the dim_date table.

 

One of the measures is called "Headcount" which is simply:

 

 

 

=count(FACT_EmployeeDetails[personnel ID])

 

 

 

 

The other measure is:

 

 

 

Number of Vacancies (EOM) = 
var result = 
SUMX(
    FILTER(
        'Dim_Date (Disconnected)',
        'Dim_Date (Disconnected)'[EndOfMonth_Flag]=TRUE()
    ),
    CALCULATE(
        DISTINCTCOUNT(FACT_Resourcing[Job Req ID]),
        FILTER(
            FACT_Resourcing,
            FACT_Resourcing[Status Action DateTime] <= 'Dim_Date (Disconnected)'[Date]
            && 'Dim_Date (Disconnected)'[Date] <=
                IF(
                    FACT_Resourcing[Closed Date]=BLANK(),
                    TODAY(),
                    FACT_Resourcing[Closed Date]
                )
        )
    )
)
return
result

 

 

 

 

In essence, these are my tables and relationships:

 

 

This is what I want to achieve in a table visual:

 

Dim_Date[Date]Measure[Headcount]Measure[Number of Vacancies (EOM)]
15/01/2023100 
16/01/2023200 
17/01/2023150 
18/01/2023100 
19/01/2023200 
20/01/2023150 
21/01/2023100 
22/01/2023200 
23/01/2023150 
24/01/2023100 
25/01/2023200 
26/01/2023150 
27/01/2023100 
28/01/2023200 
29/01/2023150 
30/01/2023100 
31/01/202320050

 

The Challenge I am having:

The headcount measure is based on tables that have a relationship, whereas the number of vacancies (EOM) is not based on any table relationship because of the disconnected table.  When I include both measures together against the date field from the dim_date table, the number of vacancies (EOM) doesn't do what I expect because the dim_date data field has a relationship.

 

Just to be clear, the reason I need to use a disconnected table for the vacancies measures is because I need to know the vacancy counts historically.

 

How can I correct this?

 

Many thanks.

 

 

 

 

No Replies