Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

TREATAS doesn't show all data

Hello!   I'd like to create virtual relationship between tables: 'Sales' and 'Plan', but TREATAS function doesn't work. When any of the position from 'Plan' does not exist in 'Sales' it works inco...
  • edhans's avatar
    5 years ago

    Can you post some actual data per links below? I am not typing that in.

     

    You cannot use TREATAS here. The function works by saying "TREAT this AS a filter for that." That is where TREATAS came from. If the data doesn't exist in this then it has nothing to filter for that. I'd be inclinced to merge or combine data in Power Query - would have to play with it. But need data.

     

    How to get good help fast. Help us help you.
    How to Get Your Question Answered Quickly - Give us a good and concise explanation
    How to provide sample data in the Power BI Forum - Provide data in a table format per the link. Provide expected output using a screenshot of Excel or other image. Do not provide a screenshot of the source data. I cannot paste an image into Power BI tables.

  • daxer-almighty's avatar
    5 years ago

    To get what you want, you can't use columns from your fact tables. You ALWAYS have to use proper dimensions to slice data by. The hard rule is that data should never be sliced and diced by columns in fact tables. Only via dimensions. Stick to this and you'll be safe.