Forum Discussion

bcoro's avatar
bcoro
Frequent Visitor
2 years ago
Solved

3 components in one field

I received one table that has thousands of rows and over a thousand columns. My issue is one field represents 3 different components. [familyunder18elementary] family represents the household type (f...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi bcoro ,

     

    Based on your description, you want to calculate the total number of elementary education level and the total number of households where children are under the age of 18. I don't see the other subcategories from the table you provided, there may be such a problem that a single person with a primary education level may be counted twice in two fields, which is difficult to separate out the number of people with all elementary education levels.

     

    Are there columns in the table for subcategories? If there were, the problem would be much simpler. You can get the value you want with a simple aggregation function.

    Measure 1 = SUM(Table[famillywithchildrenunder18])
    Measure 2 = SUM(Table[elementary])

     

    If you don't have the columns in the example above in your table, I recommend that you consider using the difference to get the results you want. For example, I want to get the number of families with children under the age of 18.

    Measure 3 = SUM(Table[familywithchildren])-SUM(Table[familywithchildrenabove18])

     

    If the above is not what you want, I suggest you provide more information, such as your PBIX file. How to provide sample data in the Power BI Forum - Microsoft Fabric Community

     

     

     

    Best regards,

    Mengmeng Li