Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi
Let's say I have this table:
Product | Month | Sales |
P1 | Jan-20 | 100 |
P1 | Jan-20 | 200 |
P2 | Jan-20 | 500 |
P2 | Feb-20 | 600 |
P1 | Mar-20 | 50 |
P2 | Mar-20 | 300 |
I want to create a NEW TABLE with summarized result like this:
Product | Month | Sales |
P1 | Jan-20 | 300 |
P1 | Mar-20 | 50 |
P2 | Jan-20 | 500 |
P2 | Feb-20 | 600 |
P2 | Mar-20 | 300 |
Your help will be much appreciated.
Thanks.
Solved! Go to Solution.
@mb0307 , not sure on the need for a new table.
New table =summarize(Table, Table[Product],Table[Month],"Sales" ,sum(table[Sales]))
You can use measure sum(table[Sales]) on any visual with Product and Month and you will get this (Table or Matrix )
@mb0307 -
Perhaps:
New Table = SUMMARIZE('Table',[Product],[Month],"Sales",SUM('Table'[Sales]))
@mb0307 -
Perhaps:
New Table = SUMMARIZE('Table',[Product],[Month],"Sales",SUM('Table'[Sales]))
@mb0307 , not sure on the need for a new table.
New table =summarize(Table, Table[Product],Table[Month],"Sales" ,sum(table[Sales]))
You can use measure sum(table[Sales]) on any visual with Product and Month and you will get this (Table or Matrix )
@amitchandak Thanks and this works perfectly.
Is it possible to sum the SALEAS based on a filter within same DAX please?
For example: If i have a measure which is calculating a Max Week for each month (Jan max week is WK5, Feb is WK9), Can I use that measure to filter the new table? So Jan-20 ignore WK1,2,3,4 and only sum values by WK5 values?
Thanks
@mb0307 - Sounds like you would need something like:
New Table = SUMMARIZE(FILTER('Table','Table'[Week] = [Max Week Measure]),'Table'[Product],'Table'[Month],"Sales",SUM('Table'[Sales]))
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 | |
102 | |
84 | |
79 | |
70 |
User | Count |
---|---|
120 | |
110 | |
95 | |
82 | |
77 |