Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

how to filter a dataset tables using date filter

Hi team,

 

I have imported the data using Power BI Datasets into my power bi desktop. but i want to restrict the data between specific dates using slicer (if we select different date source data needs to be change) or parameter because the data is having millions of records. But those specific dates will change every week.

 

example: if user selects the data for 15th jan 2021. the datasets data should be change for 15th jan 2021 only

 

can you guys help me out on this

 

Thanks & Regards,

B V S Sudhakar

3 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      hi selimovd ,

       

      Thank you for your reply. Let me explain the whole problem

      I have 3 tables in my powerbi desktop named as
      Current (selected date to before 90 days)
      Previous (before current table 90 days i.e. 91 to 180)
      Lastyear current (means same period last year for current table )

      For these 3 datasets source query is same i.e.
      Select s.*,d.weekend,d. date from sales s left join date d on s.datekey = d. id

      Now we have to give weekend as slicer for user
      if he selects 23rd jan date from slicer data should filter like this for user
      For current dataset 23rd jan 2021 to before 90 days
      For previous dataset 91st day from 23rd jan to 180 days
      For last year current dataset 23rd jan 2020 to 90 days

      How to achieve this? I am not able get any idea... can you please help me out on this

      I can't use single dataset because the reports are already developed using excel sourceNow . we have to connect to database. To connect database we have to write same views