Quantcast
Channel: Desktop topics
Viewing all articles
Browse latest Browse all 213819

Nested Crossjoin Quadrupled my Data

$
0
0

I have this DAX Code: and it quadrupled my value, is there something wrong with double crossjoins?

 

 

Get Total Hours = 
SELECTCOLUMNS(
	FILTER(
		CROSSJOIN(table_c,
			FILTER(
				CROSSJOIN(table_a,table_b),
				table_a[employee_id] = table_b[employee_id] &&
				table_a[start_date] >= table_b[date_effective_start] &&
				table_a[start_date] <= table_b[date_effective_end] &&
				table_a[start_date] >= table_b[date_production]
					)
				),
		table_a[str_buid_state_code] = table_c[str_buid_state_code] && 
		table_a[start_date] >= table_c[date_effective_start] && 
		table_a[start_date] <= table_c[date_effective_end]
              ),
	"Field Name 1", table_a[start_date],
	"Field Name 2", table_a[employee_id],
	"Field Name 3", table_b[supvsr_id],
	"Field Name 4", table_c[sys_description],"Field Name 5", table_a[duration], //this value Quadrupled
	"Field Name 6", table_c[flag_a],
	"Field Name 7", table_b[id_dept],
	"Field Name 8", table_b[id_role],
	"Field Name 1", table_b[flag_active_employee]
			)

 


Viewing all articles
Browse latest Browse all 213819

Trending Articles