Forum Discussion
Using specific data within a column in another column in the same table
- 9 years ago
hi, try with this calculated column
FruitTotal = VAR Period = Table1[Period] RETURN CALCULATE ( SUM ( Table1[Quantity] ), FILTER ( Table1, Table1[Category] = "Fruit" && Table1[Period] = Period ) )
And I should have also added in reply to your question that there is no Parent-Child ID column in the table.
hi, try with this calculated column
FruitTotal =
VAR Period = Table1[Period]
RETURN
CALCULATE (
SUM ( Table1[Quantity] ),
FILTER ( Table1, Table1[Category] = "Fruit" && Table1[Period] = Period )
)- LandonDodge9 years ago
Microsoft Employee
Vvelarde, that worked exactly. My sincere thanks to you!
- Vvelarde9 years ago
Community Champion
Another without creating this calculated column is:
Create a Measure:
%Fruit = DIVIDE ( CALCULATE ( SUM ( Table1[Quantity] ), ALLEXCEPT ( Table1, Table1[Category], Table1[Period] ) ), ( CALCULATE ( SUM ( Table1[Quantity] ), ALLEXCEPT ( Table1, Table1[Period] ) ) - CALCULATE ( SUM ( Table1[Quantity] ), FILTER ( ALLEXCEPT ( Table1, Table1[Period] ), Table1[Category] = "Fruit" ) ) ) )And put a Matrix Visual
- LandonDodge9 years ago
Microsoft Employee
Thank you, Vvelarde. Peeling back the onion layer a bit, the table I'm working from is actually a calculated table I created with the SUMMARIZE function, referencing a much more detailed table with details about each individual apple, orange, and banana purchased on invidual days making up each month. Apparently because of this, when I implement either of these solutions with my actual data, Power BI keeps wanting to consider all the Fruit in the aggregate, giving me back only the single aggregated number for all Fruit.
Is there a way for Power BI to "forget" that the calculated table created by the SUMMARIZE function is based on another table? Then I believe these solutions will work with my actual data as well as they work with my fit-for-public-consumption fruit data.