Search code examples
powerbipowerbi-desktoppowerbi-custom-visuals

How to filter and populate same value in a column in power BI?


I'm trying to achieve the column "Sales = Chair" in power bi. The goal is to filter value for a specific category and populate the value in the rows of the same column.

Category Subcategory Sales Sales = Chair

Furniture Chair 100 100

Furniture Sofa 150 100

Appliances Washer 250 100

Appliances Microwave 200 100


Solution

  • Can you try a measure like-

    new_column = 
    CALCULATE(
        SUM(your_table_name[Sales]),
        FILTER(
            ALL(your_table_name),
            your_table_name[Category] = "Furnuture"
                && your_table_name[SubCategory] = "chair"
        )
    )