Forum Discussion

panipat1990's avatar
panipat1990
Helper III
8 years ago
Solved

How to restrict data in query editor

Dear Team,

 

I am new in power bi.i have a requirement.

i have a table where 3 years data.but i want to load only 4 to 5 month's date's data..

how is possible in power bi..that it loaded only 4 to 5 month's dates data load.

how..Kindly help me its very urgent

 

Thanks

gourav

  • Anonymous's avatar
    Anonymous
    8 years ago

    HI panipat1990,

     

    I think you are talk about query parameter which create in query editor, right?

    If this is a case, current query parameter can setting dynamic list from other query, but it not support setting dynamic value based on above list.

     

    For your requirement, I'd like to suggest you direct use #"query name"['column name'] with list.max function to get dynamic value, then use it in filter steps.

     

    Sample:

     

    Regards,

    Xiaoxin Sheng

17 Replies

  • Phil_Seamark's avatar
    Phil_Seamark
    Microsoft Employee

    Hi panipat1990

     

    You can apply a filter by clicking the button at the end of a column header of your date column (as per (1)) and then choose a Date Filter that suits.

     

     

    • panipat1990's avatar
      panipat1990
      Helper III

      But i want to data only maxdate. How is it possible through parameter.

      • Phil_Seamark's avatar
        Phil_Seamark
        Microsoft Employee

        So do you mean a dynamic range of dates?  eg, always the 4 months relative to the current date?

  • Anonymous's avatar
    Anonymous
    Not applicable

    Assuming that your data is in SQL, you could create a view that would result in a 4months to date data, you could then import that on to powerBI and then setup a scheduled refresh job everyday.

    • panipat1990's avatar
      panipat1990
      Helper III

      No Sir My Question is not related this..I made Last 4 month date stored in dateparam 

      But How i apply this in my table for filtering data

      • panipat1990's avatar
        panipat1990
        Helper III

        So no one known that how to apply these parameter to fact table for filtering data

  • Anonymous's avatar
    Anonymous
    Not applicable

    can you be more specific ? are you saying tht the date slicer you have is not filtering a table you have ?

    • panipat1990's avatar
      panipat1990
      Helper III

      i want to restrict data between max_date and Before 4 month to max date in dynamic 

      i made variable max_date=List.Max(Table[Sale]) And Before 4 month Ago date variable i created..

      But When i set in my data filter it showing error...Kindly help me

      • Anonymous's avatar
        Anonymous
        Not applicable

        HI panipat1990,

         

        I think you are talk about query parameter which create in query editor, right?

        If this is a case, current query parameter can setting dynamic list from other query, but it not support setting dynamic value based on above list.

         

        For your requirement, I'd like to suggest you direct use #"query name"['column name'] with list.max function to get dynamic value, then use it in filter steps.

         

        Sample:

         

        Regards,

        Xiaoxin Sheng