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'm trying to calculate how many times a product is sold over the months in the order at least 1 time, 2+ times, 3+
In my Sales data table, I have column for "# of times Sold". I created a Matrix visualization with following parameters:
Rows: "# of Times Sold"
Columns: "Month"
Values: Count of # of Times Sold
Below is the Output of this visualization.
Sample Sales Data Table:
Month | # of Times Sold |
Jan | 1 |
Jan | 2 |
Jan | 2 |
Jan | 3 |
Jan | 3 |
Jan | 3 |
Jan | 4 |
Jan | 1 |
Jan | 2 |
Jan | 3 |
Jan | 3 |
Jan | 5 |
Jan | 1 |
Jan | 4 |
Jan | 4 |
Example Current Output (Matrix Visualization):
# of Repeat Sales | Jan |
1 | 4 |
2 | 3 |
3 | 5 |
4 | 3 |
5 | 2 |
Total | 17 |
However, I'm a beginner and need help to create the following output.
Here, assuming everything is atleast sold once, so
Atleast 1 time = total count of # of Times Sold"
2+ times = Count of "# Times Sold" with column values >=2
3+ times = Count of "# Times Sold" with column values >=3
and so on
Example Desired Output:
# of Repeat Sales | Jan |
At least 1 time | 17 |
2+ times | 13 |
3+ times | 10 |
4+ times | 5 |
5+ times | 2 |
Any help or guidance regarding this is greately appreciated.
Thank you.
Solved! Go to Solution.
Hi @FreemanZ
Thanks for your reply.
I tried creating matrix visualization with this measure, doesn't seem to work for me.
I was somehow able to create the desired output by using following steps:
hi @racs
try to plot a matrix visual with the two columns and a measure like:
measure =
COUNTROWS(
FILTER(
ALL(data),
data[# of Times Sold] >= MAX(data[# of Times Sold])
)
)
it worked like:
p.s. your dataset seems lacking one row for 1 and 5 each.
Hi @FreemanZ
Thanks for your reply.
I tried creating matrix visualization with this measure, doesn't seem to work for me.
I was somehow able to create the desired output by using following steps:
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 |
---|---|
43 | |
25 | |
19 | |
16 | |
8 |
User | Count |
---|---|
59 | |
50 | |
44 | |
21 | |
19 |