Hi so I have two tables that summarises the average of values in eaach table. The first has rows of faculty name, current question text and current question code.
The second table is current question code, current question text though the values are that for the university rather than broken down by faculty. However if I add the university to the table the matrix looks weird.
Anyhow I wrote a measure that shows what the difference between the two tables is:
Table difference = VAR facultysum = CALCULATE( AVERAGE(FACT_NSS_Combined[CRS_AGREE]), FILTER( DIM_FACULTY,VALUES(DIM_FACULTY[FACULTY_NAME])
// Add any other filters for DIM_FACULTY here ), FILTER( DIM_NSS_QUESTION, DIM_NSS_QUESTION[NSS_CURRENT_QUESTION_CODE] = VALUES(DIM_NSS_QUESTION[NSS_CURRENT_QUESTION_CODE]) && DIM_NSS_QUESTION[NSS_CURRENT_QUESTION_TEXT] = VALUES(DIM_NSS_QUESTION[NSS_CURRENT_QUESTION_TEXT]) // Add any other filters for DIM_NSS_QUESTION here ) )
VAR PortSum =
CALCULATE(
AVERAGE(FACT_NSS_Combined[CRS_AGREE]),
FILTER(
DIM_FACULTY,VALUES(DIM_FACULTY[FACULTY_NAME])
// Add any other filters for DIM_FACULTY here
),
FILTER(
DIM_NSS_QUESTION,
DIM_NSS_QUESTION[NSS_CURRENT_QUESTION_CODE] = VALUES(DIM_NSS_QUESTION[NSS_CURRENT_QUESTION_CODE]) &&
DIM_NSS_QUESTION[NSS_CURRENT_QUESTION_TEXT] = VALUES(DIM_NSS_QUESTION[NSS_CURRENT_QUESTION_TEXT])
// Add any other filters for DIM_NSS_QUESTION here
)
)
VAR result = facultysum - PortSum
RETURN result
When I try to apply conditional formatting to the values of the table I get an error like the image. How can I rectify my code to ensure the conditional formatting works?
Thanks in advance.
The second table is current question code, current question text though the values are that for the university rather than broken down by faculty. However if I add the university to the table the matrix looks weird.
Anyhow I wrote a measure that shows what the difference between the two tables is:
Table difference = VAR facultysum = CALCULATE( AVERAGE(FACT_NSS_Combined[CRS_AGREE]), FILTER( DIM_FACULTY,VALUES(DIM_FACULTY[FACULTY_NAME])
// Add any other filters for DIM_FACULTY here ), FILTER( DIM_NSS_QUESTION, DIM_NSS_QUESTION[NSS_CURRENT_QUESTION_CODE] = VALUES(DIM_NSS_QUESTION[NSS_CURRENT_QUESTION_CODE]) && DIM_NSS_QUESTION[NSS_CURRENT_QUESTION_TEXT] = VALUES(DIM_NSS_QUESTION[NSS_CURRENT_QUESTION_TEXT]) // Add any other filters for DIM_NSS_QUESTION here ) )
VAR PortSum =
CALCULATE(
AVERAGE(FACT_NSS_Combined[CRS_AGREE]),
FILTER(
DIM_FACULTY,VALUES(DIM_FACULTY[FACULTY_NAME])
// Add any other filters for DIM_FACULTY here
),
FILTER(
DIM_NSS_QUESTION,
DIM_NSS_QUESTION[NSS_CURRENT_QUESTION_CODE] = VALUES(DIM_NSS_QUESTION[NSS_CURRENT_QUESTION_CODE]) &&
DIM_NSS_QUESTION[NSS_CURRENT_QUESTION_TEXT] = VALUES(DIM_NSS_QUESTION[NSS_CURRENT_QUESTION_TEXT])
// Add any other filters for DIM_NSS_QUESTION here
)
)
VAR result = facultysum - PortSum
RETURN result
When I try to apply conditional formatting to the values of the table I get an error like the image. How can I rectify my code to ensure the conditional formatting works?
Thanks in advance.