Forum Discussion

  • NikolinoDE's avatar
    NikolinoDE
    Gold Contributor

    Gabriela65 

    The DAX function you've provided seems to have a typo. Instead of "RELETED", you likely meant to use the "RELATED" function in Power Pivot. Here's the corrected function:

    =RELATED('Cookie type'[Cost Per Cookie]) * RELATED(Order[Units Sold])

    Assuming that "Cookie type" and "Order" are tables in your Power Pivot data model, this formula should retrieve the related cost per cookie from the "Cookie type" table and the units sold from the "Order" table, and then multiply them together to calculate the total cost.

    If you're still getting empty cells, double-check the data model relationships and the values in your tables to ensure they are correctly related and populated. Additionally, check if there are any filters or slicers applied that might be affecting the results.

    Here some troubleshoots additionally:

    1. Relationship Not Established: Make sure that there is a proper relationship established between the tables involved in the calculation. The tables must be related based on a common column, usually a primary key in one table and a foreign key in the other.
    2. Invalid Column Name: Double-check the column name 'Cookie type‘[Cost Per Cookie] to ensure that it exists in the related table and that the name is spelled correctly, including any special characters or spaces.
    3. No Matching Records: If there are no matching records between the two tables based on the relationship, the RELATED function will return an empty cell. Verify that there are matching records for the calculation to work.
    4. Data Model Refresh: Ensure that the data model in Power Pivot is refreshed to reflect any changes made to the underlying data or relationships. Sometimes, changes may not be applied until the data model is refreshed.
    5. Errors in Data: Check for any errors or inconsistencies in the data that could prevent the calculation from returning the expected results. This includes checking for null values, data types, and formatting issues.
    6. Expression Evaluation: If the formula involves complex expressions or calculations, verify that each part of the expression evaluates correctly and produces the expected results. You can break down the formula into smaller parts and test each part individually to identify any issues.

    By troubleshooting these potential issues, you should be able to identify why the RELATED function is returning an empty cell in your Power Pivot calculation. The text and steps were edited with the help of AI.

     

    My answers are voluntary and without guarantee!

     

    Hope this will help you.

    Was the answer useful? Mark as best response and Like it!

    This will help all forum participants.

     

Resources