Forum Discussion
Anonymous
1 year agoNot applicable
Dynamic segments calculation for each month or week
Hello everyone! This may be easily solved but I can't get my head around it. I have sales data which has shop ID, date, quantity, city etc. as shown below what I want to achieve in Power B...
Anonymous
1 year agoNot applicable
I am thinking of whenever a month is filtered to create a dummy table that group sales by Shop IDs and ordered them from high to low and then assigns segments to them based on their percentage.
then in the table visual I just count the ID by segments cause it's already a distinct count of shops because it was grouped by shop id but I'm not sure how to achieve that.
- Anonymous1 year agoNot applicable
Hi Anonymous ,
As per my understanding, if I want to set date and city filters in the table, I have to add the date and city condition when calculating the total sales by shopid, is this right?please feel free to reply.
Total Sales by Shop = CALCULATE( SUM('Larger_Test_Sales_Data'[sales qty]), ALLEXCEPT('Larger_Test_Sales_Data', 'Larger_Test_Sales_Data'[shop ID],Larger_Test_Sales_Data[City],Larger_Test_Sales_Data[Date].[Month]) )Best regards,
Joyce
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.