Forum Discussion

Yaya1990's avatar
Yaya1990
Frequent Visitor
4 years ago

Filter based on Table

Hi Dears,

 

I am working on a dashboard reading data from 4 different sensors, and each has a different table, is there any way I can filter my data based on a table, or how can I create a filter to see the data of the specific sensor.

 

Your help will be highly appreciated.

 

Regards,

 

Fahad

 

 

11 Replies

    • Yaya1990's avatar
      Yaya1990
      Frequent Visitor

      Hi, thanksyou for replying, I need a filter in slicer showing four different tables, once i click on one it only displays the data for that sensor? is it possible?

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Yaya1990 .
    You can create a custom table using 'Enter Data' and add your table names in there, drag a slicer and add the custom table values in it i.e. now in your slicer you will have 4 different table names.

    Now in your measure pass those tables values in the calculation using SELECTEDVALUE.


    For example, 
    test=
    var a=SELECTEDVALUE(Table[TableNames])
    return
    SWITCH(TRUE(),a=Employee_Table,[Employee_Count],b=Sales_table,[SumSales],c=IT_Table,[CountMeasure],d=Healthcare,[Measure])

    Now add your test measure inside a KPI or any other visual you want


    Please let me know if it works.

    Thanks,
    Sanket


    If this post helps, then mark it as 'Accept as Answer' and give it a thumbs up


    • Yaya1990's avatar
      Yaya1990
      Frequent Visitor

      Hi, let me give you my table names

       

      Suppose,

      Table 1

      Table 2

      Table 3

      Table 4

       

      Each table has a column named as difference where i have calculated a value. 

       

      I need to do this (Difference Table 1 + Difference Table 2 + Difference Table 3 + Difference Table 4) and then show it on a bar chart.

       

      once this is done, i need slicer filter, where if i click Table 1, it only shows me the data for table 1 and hide other information.

       

      Please help me if you can as this is very imp dashbaord, and let me know if you need more clarification.

       

      Regards,

       

      Fahad

      • Anonymous's avatar
        Anonymous
        Not applicable

        Click on Enter Data and create a custom table.
        Let's say table test; give a column name as 'column_name' and under that provide your 4 table names i.e. Table1 to Table4.

        Add this table to a slicer visual.


        Create a sum of Difference measure;
        Sum_Diff=Difference_Table1+Difference_Table2+Difference_table3+Difference_table4.

        Create a measure which will show your difference values;
        Difference=
        var a=Test['column_name']
        return
        SWITCH(TRUE(),
        a=Table1,[Difference_Table1],a=Table2,[Difference_Table2],a=Table3,[Difference_Table3],a=Table4,[Difference_Table4],[Sum_Diff])

        Let me know if it works.

        If this post helps, then mark it as 'Accept as Answer' and give it a thumbs up