Forum Discussion
DoeJoe
1 year agoFrequent Visitor
Filter table visual from a Measure on a Matrix Visual
I have a table that has multiple fields with blank values. I create Measures to count the blank values for each field and display them in a Matrix using the Switch Values to Rows option. I have a v...
- 1 year ago
Hello DoeJoe,
Can you please try this approach - You already have measures to count the blank values:
CountBlank_Field1 = CALCULATE(COUNTROWS(TableName), ISBLANK(TableName[Field1])) CountBlank_Field2 = CALCULATE(COUNTROWS(TableName), ISBLANK(TableName[Field2])) CountBlank_Field3 = CALCULATE(COUNTROWS(TableName), ISBLANK(TableName[Field3]))Now, create a Selection Indicator:
SelectedFieldFilter = VAR SelectedField = SELECTEDVALUE(MatrixFields[FieldName]) RETURN SWITCH( TRUE(), SelectedField = "Field1", ISBLANK(TableName[Field1]), SelectedField = "Field2", ISBLANK(TableName[Field2]), SelectedField = "Field3", ISBLANK(TableName[Field3]), TRUE() )Hope this helps!
- Anonymous1 year ago
Hi Sahir_Maharaj ,thanks for the quick reply, I'll add more.
Hi DoeJoe ,
Creating a slicer instead of clicking through measures.
Try this
Measure = VAR _column = SELECTEDVALUE('Table (2)'[Column]) RETURN IF(ISFILTERED('Table (2)'[Column]), SWITCH(TRUE(), _column = "Column1",IF( SELECTEDVALUE('Table'[Column1]) = "",SELECTEDVALUE('Table'[Column1])), _column = "Column2",IF( SELECTEDVALUE('Table'[Column2]) = "",SELECTEDVALUE('Table'[Column2])), _column = "Column3",IF( SELECTEDVALUE('Table'[Column3]) = "",SELECTEDVALUE('Table'[Column3])) ),"" )Best Regards
Sahir_Maharaj
1 year agoSuper User
Hello DoeJoe,
Can you please try this approach - You already have measures to count the blank values:
CountBlank_Field1 =
CALCULATE(COUNTROWS(TableName), ISBLANK(TableName[Field1]))
CountBlank_Field2 =
CALCULATE(COUNTROWS(TableName), ISBLANK(TableName[Field2]))
CountBlank_Field3 =
CALCULATE(COUNTROWS(TableName), ISBLANK(TableName[Field3]))
Now, create a Selection Indicator:
SelectedFieldFilter =
VAR SelectedField = SELECTEDVALUE(MatrixFields[FieldName])
RETURN
SWITCH(
TRUE(),
SelectedField = "Field1", ISBLANK(TableName[Field1]),
SelectedField = "Field2", ISBLANK(TableName[Field2]),
SelectedField = "Field3", ISBLANK(TableName[Field3]),
TRUE()
)
Hope this helps!
DoeJoe
1 year agoFrequent Visitor
Super helpful, thank you. My requirements changed slightly in that the filtering key is in separate tables.
Table 1 = All data including Unique Key
Table 2 = Issue 1 Unique Key
Table 3 = Issue 2 Unique Key
I have a table visualization of fields in Table 1 that need to be filtered by all Unique Keys.