Forum Discussion

vadhikari's avatar
vadhikari
New Member
8 years ago

Use Slicer to dynamically get data from 2 tables

Hi All , 

 

I have 2 tables .

 

TABLE_A_EURO

TABLE_B_LCLCCY

 

I have created a dummy table "CURRENCY".

It has one field - "type".

It has 2 values "EURO" , "LOCAL".

 

If i select EURO , i want to get columns from TABLE_A_EURO & vice versa.

 

Is it possible ? Please help 

 

Thanks in advance.

2 Replies

  • Hi , 

     

    I have 2 tables 

     

    TABLEA_EURO

    TABLEB_LOCALCCY

     

    I have created a dummy table "Currency" with field "type". it has 2 values - EURO & LOCAL.

    I am using it a slicer , & based on EURO selection , i want to use TABLEA_EURO columns .

    If LOCAL is selected in Slicer , then TABLEB_LOCALCCY columns should be used in the graphs.

     

    Is it possible??

     

    Thanks in advance.

  • Anonymous's avatar
    Anonymous
    Not applicable

    vadhikari,

    What are the fields in TABLE_A_EURO, TABLE_B_LCLCCY? I make a test using the following sample data.


    Merge the two tables into a new table based on Name field, then create a measure in the merged table using DAX below.

    selectedValue = 
    IF (
        ISFILTERED ( 'dummy table'[Type]) && HASONEVALUE ('dummy table'[Type]),
         if(LASTNONBLANK ('dummy table'[Type], 0 )="EURO",
       MAX(Merge2[EURO]),
       MAX(Merge2[TABLE_B_LCLCCY.LOCAL]) 
       )
      ,
         BLANK()
    )




    Regards,
    Lydia