Forum Discussion
Table visuals report
Hi bzeeblitz ,
To achieve the desired Power BI report that filters data based on the conditions Createdwhen = 'PO created yesterday' and onhand > 9 months, follow these steps using DAX. First, import the Cycle, POItem, and Demand tables into Power BI and establish relationships between them. Specifically, link Cycle[Item#] to POItem[Item#] and Cycle[Item#] to Demand[Item Number].
Next, create a calculated table named FilteredPOItem to filter the POItem table. Use the DAX formula:
FilteredPOItem =
FILTER(
POItem,
LOWER(POItem[Createdwhen]) = "po created yesterday"
)
Similarly, create another calculated table named FilteredDemand to filter the Demand table. Use the formula:
FilteredDemand =
FILTER(
Demand,
LOWER(Demand[onhand>9 months]) = "more than 9 months onhand"
)
After filtering the individual tables, create a combined calculated table that merges the filtered data from Cycle, FilteredPOItem, and FilteredDemand. Use the DAX formula:
FilteredTable =
SUMMARIZECOLUMNS(
Cycle[Item#],
Cycle[Order:Card Type],
Cycle[PO#],
Demand[onhand>9 months],
POItem[Vendor name],
FILTER(
FilteredPOItem,
FilteredPOItem[Item#] = Cycle[Item#]
),
FILTER(
FilteredDemand,
FilteredDemand[Item Number] = Cycle[Item#]
)
)
Finally, add a table visual to the report and include the following columns: Cycle[Item#], Cycle[Order:Card Type], Cycle[PO#], Demand[onhand>9 months], and POItem[Vendor name]. This ensures the report dynamically filters and displays data meeting the specified conditions. Ensure the relationships in the model are correctly set up to enable filtering and cross-referencing between the tables. Let me know if any further assistance is needed.
Best regards,
im unable to create relatinships for below links as im getting error
Specifically, link Cycle[Item#] to POItem[Item#] -Error-"There is already a relationship between two columns"
Cycle[Item#] to Demand[Item Number].Error-"There is already a relationship between two columns"