Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Help With Relationship Table Where Values are Total vs Net

I am not sure what I'm looking to do can be logically done, so I am open to suggestions. Essentially, what I want to do is link up two tables with a dimension table. The dimension table has: Labor Ne...
  • PaulDBrown's avatar
    6 years ago

    Anonymous 

     

    From what I'm understanding, you cannot do (should not do more likely) what you are attempting to do using a dimension table (in the "traditional" sense). Dimension tables typically contain the unique values (usually text/date fields)  contained in fact tables to enable filtering in visuals, pages and measures etc.

    So what you are suggesting would imply including the unique values of an aggregation from your fact tables (which in most cases makes little sense).

    What you can do, is set up a table (using the "enter data" option in the home ribbon) with the values "Labor net" and "Overtime net". Let's call this table Cost Type.

     


    This table is independent (unrelated) from your fact tables (ie, there are no relationships). You can use this table as a slicer/filter etc in your report.

     

    You then write measures referencing the selection made on this table (as slicer etc).

    For example:

     

     

    Cost Type selection = IF(SELECTEDVALUE('Cost Type'[Cost Type]) = "Labor Net", [Sum of Labor Net], [Sum of Overtime Net Net])

     

     

     

    And use this measure in your visuals:

     

    Hope that helps. (I've attached the sample PBIX file for reference)