Forum Discussion

afva_2000's avatar
afva_2000
Regular Visitor
4 years ago
Solved

Filter a table with dates coming form another table

Hi, I have a Table (Table1) with this columns (Time, shop, Start_time, End_Time) and a secund table (Table2) with the this columns (Time, shop, Sales). I'm making a dashboard that use the Table1 t...
  • v-jingzhang's avatar
    4 years ago

    Hi afva_2000 

     

    Create below measure and put it into the line chart's filter pane as a filter field. Set it to show items when value is 1. 

    TimeFlag = 
    var vStartTime = SELECTEDVALUE(tabla_pbi[start_time])
    var vEndTime = SELECTEDVALUE(tabla_pbi[end_time])
    var vTime = SELECTEDVALUE(super_tabla[Time])
    return
    if(HASONEVALUE(tabla_pbi[start_time]), if(vStartTime<=vTime && vEndTime>=vTime, 1, 0), 1)

     

    Best Regards,
    Community Support Team _ Jing
    If this post helps, please Accept it as Solution to help other members find it.