Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I am trying to find dax for Sum of Averages in calc column.
Here is a dataset with desirable column:
Week id | Category | Product | Sales | Avg Sales per Product | Sum of Avg Sales per Product |
1 | Home | AA | 1 | 1 | 5 |
2 | Home | AA | 1 | 1 | 5 |
3 | Home | AA | 1 | 1 | 5 |
1 | Home | BB | 7 | 4 | 5 |
2 | Home | BB | 1 | 4 | 5 |
2 | Garden | CC | 6 | 6 | 13 |
3 | Garden | CC | 6 | 6 | 13 |
4 | Garden | CC | 2 | 6 | 13 |
5 | Garden | CC | 10 | 6 | 13 |
6 | Garden | CC | 4 | 6 | 13 |
8 | Garden | CC | 8 | 6 | 13 |
4 | Garden | DD | 7 | 7 | 13 |
It is summing Average Sales for each product within category. 1+4=5 or 6+7=13
I know you think it not make sens (why to sum up average Sales?) or I should do this in measure.
I know for the most of scenarios measure will be the right choice. But I need this in column. I need it for further more compex calculations.
Solved! Go to Solution.
@Anonymous
Try this column
Column = SUMX ( SUMMARIZE ( FILTER ( Table1, Table1[Category] = EARLIER ( Table1[Category] ) ), Table1[Category], Table1[Product], Table1[Avg Sales per Product] ), [Avg Sales per Product] )
@Anonymous
Try this column
Column = SUMX ( SUMMARIZE ( FILTER ( Table1, Table1[Category] = EARLIER ( Table1[Category] ) ), Table1[Category], Table1[Product], Table1[Avg Sales per Product] ), [Avg Sales per Product] )
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
87 | |
64 |