Forum Discussion

sunilhetu's avatar
sunilhetu
Frequent Visitor
1 year ago
Solved

Fliter dataset

I have a table where my all date is there. This is my fliter for single select date. Now i have another dataset where i want get data of -9 days of of selected date.

 

Ex,

 

03/07/25

 

Another dataset has data

01 03/04/2025

02 03/14/2025

03 03/03/2025

04 03/05/2025

05 03/11/2025

 

i want data set with this data

01 03/04/2025

03 03/03/2025

04 03/05/2025

 

how to fliter dataset with selected date. TIA

 

 

 

 

9 Replies

  • sunilhetu 

    you can try to create a measure

     

     

    Measure = if(max('Table'[date])<=max('Table (2)'[date])&&max('Table'[date])>=max('Table (2)'[date])-9,1)
     
    and add this measure to visual filter and set to 1
     
     
    pls see the attachment below
  • sunilhetu's avatar
    sunilhetu
    Frequent Visitor

    I try that one it is not working. It shows data of way back like 01/01/2025 i have lot of data into dataset but it is not returing data what i expect. I am doing matrix table date at column and order number at row and total order vaule in matrix. i expect to get data for last 9 days.

     

     

    • ryan_mayu's avatar
      ryan_mayu
      Super User

      then pls update your sample data and expected output

      • sunilhetu's avatar
        sunilhetu
        Frequent Visitor

        here is data 

         

        Filter date which is single select date, this is from the table

         

         

        Here is my dataset where i want to fliter for last 9 days whenver they select date. 

           order date   item number price

        1 03/03/2025   1                   50

        2 03/04/2025   2                   60

        3 03/03/2025   3                   70

        4 03/04/2025   4                    80

        5 03/06/2025   6                    90

        6 02/01/2025   7                    90

         

        when i select 03/06/2025 i want to go all back with -9 order date it ilike paramter in SSRS to get filter from dataset from selected date all backward to 9 days

         

        i am doing matrix

         

        Item number      02/26/2025  .......03/03/2025     03/04/2025     03/05/2025   03/06/2025

        1                           0                         50                       0                       0                    0

        2                           0                          0                        60                      0                    0

        3                           0                          70                      0                        0                    0

        4                           0                            0                        80                    0                      0

        5                            0                           0                       0                        0                    90

         

        in this we should notget 02/02/2025 date at all which is not < 9 days

         

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi sunilhetu ,

    Did the above suggestions help with your scenario? if that is the case, you can consider Kudo or Accept the helpful suggestions to help others who faced similar requirements.

    If these also don't help, please share more detailed information and description to help us clarify your scenario to test.

    How to Get Your Question Answered Quickly 

    Regards,

    Xiaoxin Sheng

  • sunilhetu's avatar
    sunilhetu
    Frequent Visitor

    with fliter - dataset - 2 issue is that item still showing if is not there for date. i chose 03/10 data should not show for item 6 in matrix because that data for 02/01/2025. I really appericate for help.

     

     

  • sunilhetu's avatar
    sunilhetu
    Frequent Visitor

    Thank you very much and really appericate it. Work as expcted learn lot from measure this time. i am new to Power BI but this help lot ryan.