Forum Discussion

Legend_11's avatar
Legend_11
Resolver I
1 year ago
Solved

Paginated Report Parameter issue

While passing two parameters, I am getting the error  "Can't Determine the relationship between two fields", parameters are coming from different tables, how to sort out this error, I need to pass values from that two different tables to Paginated reports while creating

  • I Created the measure and use it as parameter, that worked. 

    SelectedValueA = SELECTEDVALUE(Tablename[columnname])


2 Replies

    1. Ensure Proper Relationships in the Data Model:
    • Check for Existing Relationships:
      • Go to the Model view in Power BI Desktop.
      • Verify that there is a direct or indirect relationship between the two tables from which you are passing parameters.
      • If the relationship is missing, you’ll need to create one.
    • Create a Relationship:
      • Identify the common key between the two tables.
      • Drag and drop the common field from one table to the corresponding field in the other table to create a relationship.
    1. Use a Bridge Table (If Necessary):
    • Create a Bridge Table:
      • If the tables don’t share a common key, you can create a Bridge Table that holds the common key or a combination of keys that link the two tables.
      • Create relationships between each table and the bridge table.
    • Manage Relationships in Power BI:
      • Once the bridge table is created, link both tables to the bridge table using one-to-many relationships.
      • This allows you to establish an indirect relationship between the tables.
    1. Use DAX to Relate Tables:
    • TREATAS Function:
      • If you can't or don't want to create a direct relationship, you can use the TREATAS function in DAX to apply filters from one table to another.
      • Example:

    FilteredTable =

    CALCULATETABLE(

        Table2,

        TREATAS(VALUES(Table1[Column1]), Table2[Column2])

    )

      • This approach allows you to pass parameters by virtually relating the tables in a measure or calculated table.
    1. Use Both Tables as Independent Datasets in Paginated Reports:
    • If your scenario involves passing parameters to a Paginated Report in Power BI, ensure that both parameters are handled correctly within the report:
      • Independent Parameters:
        • Pass both parameters as independent fields and manage the filtering logic within the paginated report.
      • Dataset Filtering:
        • Use expressions within the Paginated Report to filter datasets based on the passed parameters.

     

  • I Created the measure and use it as parameter, that worked. 

    SelectedValueA = SELECTEDVALUE(Tablename[columnname])