Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Get ALL the values in the Table visual when the selected value in the slicer is not there

Hi Everyone,

 

I have requirement . I have 2 tables as below:-

 

Fact_Table 1 

ID1

101

102

102

103

104

105

105 

 

Dim_Table1

ID2

101

102

103

104

105

106

 

When I put the Dim_Table1 ID2 in the slicer and Put ID1 from Fact_Table1 in the Table visual.

 

The ask is if I select 106 It should give me everything as an output as there is no value for 106 in Fact table.

 

If I select any other value 101 or 102 if should filter the Table visual and give the filter output 101 or 102 respectively.

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Anonymous ,

     

    According to your description, here are my steps you can follow as a solution.

    (1) My test data is the same as yours.

    (2) We can create a table and a measure. 

    Table = EXCEPT('Dim_Table1','Fact_Table 1')
    Flag = 
    var _a=SELECTEDVALUE('Dim_Table1'[ID2])
    RETURN SWITCH(TRUE(),
    MAX('Fact_Table 1'[ID1]) in VALUES('Dim_Table1'[ID2]),1,
    _a IN VALUES('Table'[ID2]),1,0)

    (3) Place [Flag=1] on the visual filter and then the result is as follows.

    Best Regards,

    Neeko Tang

    If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

     

    According to your description, here are my steps you can follow as a solution.

    (1) My test data is the same as yours.

    (2) We can create a table and a measure. 

    Table = EXCEPT('Dim_Table1','Fact_Table 1')
    Flag = 
    var _a=SELECTEDVALUE('Dim_Table1'[ID2])
    RETURN SWITCH(TRUE(),
    MAX('Fact_Table 1'[ID1]) in VALUES('Dim_Table1'[ID2]),1,
    _a IN VALUES('Table'[ID2]),1,0)

    (3) Place [Flag=1] on the visual filter and then the result is as follows.

    Best Regards,

    Neeko Tang

    If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly.