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.
Hi,
I have data as follows:
Category ID | Sub-Category ID | ITEM ID | Sales |
1001 | 100101 | 2 | 1000 |
1002 | 100201 | 2 | 2000 |
1003 | 100301 | 8 | 3000 |
1001 | 100102 | 2 | 1200 |
1001 | 100101 | 8 | 2000 |
1002 | 100201 | 18 | 1500 |
Now I want Item ID need to be sum up by Category ID and Sub-Category ID, the resultant Item ID need to be used as axis in column chart.
Eg: Category Id = 1001, Sub-category id = 100101 has two Item Id's = 2 & 8 (the resultant item id is sum of 2 and 8 = 10) and Sales Value = 3000
Now I need Item id = 10 to be used in "axis field" and sum of Sales = 3000 in "values field" of column chart. Same need to follow with other Category and Sub-category id's
Note: we don't use Category ID and Sub category Id in column chart.
Please help me to do it.
Thanks,
AshDil
Solved! Go to Solution.
Hi,
One of ways to solve this is to create a new table like below.
Please check the below picture and the attached pbix file.
New Table =
GROUPBY (
Data,
Data[Category ID],
Data[Sub-Category ID],
"@AxisItemID", SUMX ( CURRENTGROUP (), Data[ITEM ID] ),
"@SumSales", SUMX ( CURRENTGROUP (), Data[Sales] )
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hi,
One of ways to solve this is to create a new table like below.
Please check the below picture and the attached pbix file.
New Table =
GROUPBY (
Data,
Data[Category ID],
Data[Sub-Category ID],
"@AxisItemID", SUMX ( CURRENTGROUP (), Data[ITEM ID] ),
"@SumSales", SUMX ( CURRENTGROUP (), Data[Sales] )
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
@AshDil , A new column
Sumx(Filter(Table, [Category Id] = earlier([Category Id]) && [Sub-category id] = earlier([Sub-category id]) ), [Item ID] )
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 |
---|---|
110 | |
97 | |
78 | |
64 | |
55 |
User | Count |
---|---|
143 | |
109 | |
89 | |
84 | |
66 |