Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Filter a report using query string parameters in the URL, the value is from a dashboard table

I need to filter a URL by Month when the Month is coming from a table Date Dimension which is created in the frontend. Here is a screenshot of the slicer and I have to pass the month of July for example in the URL:

The table date dimension is created as shown below:

Date Dimension =

ADDCOLUMNS (

CALENDAR (MIN('Fact table'[date]), MAX('Fact table'[date])),

"DateAsInteger", FORMAT ( [Date], "YYYYMMDD" ),

"Year", YEAR ( [Date] ),

"Monthnumber", FORMAT ( [Date], "MM" ),

"YearMonthnumber", FORMAT ( [Date], "YYYY/MM" ),

"YearMonthDatenumber", FORMAT ( [Date], "YYYY/MM/DD" ),

"YearMonthShort", FORMAT ( [Date], "MMM-YY" ),

"MonthNameShort", FORMAT ( [Date], "mmm" ),

"MonthNameLong", FORMAT ( [Date], "mmmm" ),

"WeekNumber", WEEKNUM([Date], 2),

"DayOfWeekNumber", WEEKDAY ( [Date] ),

"DayOfWeek", FORMAT ( [Date], "dddd" ),

"DayOfWeekShort", FORMAT ( [Date], "ddd" ),

"Quarter", "Q" & FORMAT ( [Date], "Q" ),

"YearQuarter", FORMAT ( [Date], "YYYY" ) & "/Q" & FORMAT ( [Date], "Q" ))

 

https://app.powerbi.com/.......................removed.................../ReportSection?filter=Date_x0020_Dimension/MonthNameShort eq 'Jan' isn't working. Kindly help me solve this issue.

 

Note, There seems to be no hidden table for it in DAX Studio .

  • Hi Anonymous ,

    Please check if the following restrictions are involved:

    Considerations and troubleshooting

    There are a couple of things to be aware of when using the query string parameters.

    • When using the in operator, the values to the right of in must be a comma-separated list enclosed in parentheses.
    • Power BI Report Server also supports the ability to specify more than one filter using the “filter” URL parameter. Here's an example of what the URL might look like in Power BI Report Server: https://reportserver/reports/powerbi/Store Sales?rs:Embed=true&filter= Store/Territory eq 'NC' and Store/Chain eq 'Fashions Direct'
    • Report URL filters have a 10-expression limit (10 filters connected by AND).
    • The long data type is (2^53-1) due to JavaScript limitations.
    • Power BI doesn't limit the number of characters in URL query strings. Different browsers have different length restrictions.
    • You can't filter on table or column names that start with the capital letters INF, including, for example, a table name starting with "INFORMATION". Upper-case INF is a special value in OData. If you want to start a table or column name with "INF", make it lower-case "inf" instead.

    Embedding scenarios

    URL filters are supported in some embedding scenarios and not in others.

    To learn more details ,refer:

    https://docs.microsoft.com/en-us/power-bi/collaborate-share/service-url-filters 

     

    Did I answer your question? Mark my post as a solution!


    Best Regards

    Lucien

2 Replies

  • v-luwang-msft's avatar
    v-luwang-msft
    Community Support

    Hi Anonymous ,

    Please check if the following restrictions are involved:

    Considerations and troubleshooting

    There are a couple of things to be aware of when using the query string parameters.

    • When using the in operator, the values to the right of in must be a comma-separated list enclosed in parentheses.
    • Power BI Report Server also supports the ability to specify more than one filter using the “filter” URL parameter. Here's an example of what the URL might look like in Power BI Report Server: https://reportserver/reports/powerbi/Store Sales?rs:Embed=true&filter= Store/Territory eq 'NC' and Store/Chain eq 'Fashions Direct'
    • Report URL filters have a 10-expression limit (10 filters connected by AND).
    • The long data type is (2^53-1) due to JavaScript limitations.
    • Power BI doesn't limit the number of characters in URL query strings. Different browsers have different length restrictions.
    • You can't filter on table or column names that start with the capital letters INF, including, for example, a table name starting with "INFORMATION". Upper-case INF is a special value in OData. If you want to start a table or column name with "INF", make it lower-case "inf" instead.

    Embedding scenarios

    URL filters are supported in some embedding scenarios and not in others.

    To learn more details ,refer:

    https://docs.microsoft.com/en-us/power-bi/collaborate-share/service-url-filters 

     

    Did I answer your question? Mark my post as a solution!


    Best Regards

    Lucien

  • v-luwang-msft's avatar
    v-luwang-msft
    Community Support

    Hi Anonymous ,

    Has your problem been solved, if so, please consider Accept a correct reply as the solution or share your own solution to help others find it.

    Best Regards
    Lucien