Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Dynamic slicer for changing data in more than one table

Hi,

 

In one tab, I built to tables. One for MTD data and one for YTD data. For selecting 'early', 'late', 'on time' or 'on time and early' I build a slicer table which selects the correct value in the table. This is working OK now for MTD table.

 

 

I used this calculation:

Measure Selection =
SWITCH( TRUE(),
VALUES(OTD_slicer_table[OTD_category]) = "On time and early" ,[MTD % On time or early],
VALUES(OTD_slicer_table[OTD_category]) = "On time",[MTD % On time],
VALUES(OTD_slicer_table[OTD_category]) = "Early",[MTD % Early],
VALUES(OTD_slicer_table[OTD_category]) = "Late",[MTD % Late],
BLANK())

 

 

Now I want that the YTD table reacts on the same slicer. Now it is hard connted to 'YTD % on time', but I want it to be variable dependent on the slicer. Question is if this can be integrated into the same slicer or do I need to build a seperate slicer which connects to YTD percentages? Preferable on slicer which changes data in both tables.

 

Thanks in advance for help!

 

 

  • Hi Anonymous,

     

    Actually, it is not necessary to create another slicer to work on it. What you need do is adding different result you want.

     

    Measure Selection =
    SWITCH( TRUE(),
    VALUES(OTD_slicer_table[OTD_category]) = "On time and early" ,[YTD % On time or early],
    VALUES(OTD_slicer_table[OTD_category]) = "On time",[YTD % On time],
    VALUES(OTD_slicer_table[OTD_category]) = "Early",[YTD % Early],
    VALUES(OTD_slicer_table[OTD_category]) = "Late",[YTD % Late],
    BLANK())

    If I misunderstood you, kindly share your sample data and excepted result to me. Please upload your files to One Drive and share the link here.

     

    Regards,

    Frank

     

2 Replies

  • v-frfei-msft's avatar
    v-frfei-msft
    Icon for Community Support rankCommunity Support

    Hi Anonymous,

     

    Actually, it is not necessary to create another slicer to work on it. What you need do is adding different result you want.

     

    Measure Selection =
    SWITCH( TRUE(),
    VALUES(OTD_slicer_table[OTD_category]) = "On time and early" ,[YTD % On time or early],
    VALUES(OTD_slicer_table[OTD_category]) = "On time",[YTD % On time],
    VALUES(OTD_slicer_table[OTD_category]) = "Early",[YTD % Early],
    VALUES(OTD_slicer_table[OTD_category]) = "Late",[YTD % Late],
    BLANK())

    If I misunderstood you, kindly share your sample data and excepted result to me. Please upload your files to One Drive and share the link here.

     

    Regards,

    Frank

     

    • v-frfei-msft's avatar
      v-frfei-msft
      Icon for Community Support rankCommunity Support

      Hi Anonymous,

       

      Does that make sense? If so, kindly mark my answer as the solution to close the case please. Thanks in advance.

       

      Regards,

      Frank