Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I feel like I'm very close to solving this, but I have been going in circles for hours, so figured best to ask someone who actually understands DAX 😀.
Below is some sample data in a table that I imported into Power BI.
I can get an appropriate view of the distinct count of customers that have Revenue in certain quarters by Product and in total and when filtering by quarter (example snapshots below):
To get this, I'm doing a matrix with customer and the below Measure:
This seems like it would be incredibly easy, but I cannot seem to figure it out.
Source Table:
Customer Name | Product | 22Q1 | 22Q2 | 22Q3 | 22Q4 | 23Q1 | 23Q2 | 23Q3 | 23Q4 | 24Q1 |
Customer 1 | Product A | 125,736 | 135,712.41 | 101,553.21 | 101,553 | 101,553 | 101,553 | 101,541 | 101,541 | 101,541.30 |
Customer 1 | Product C | 31,964.68 | 31,964.68 | 31,964.68 | 31,613.55 | 31,613.55 | 31,613.55 | 31,613.55 | 35,000 | 35,000 |
Customer 1 | Product D | 709 | ||||||||
Customer 2 | Product A | 9,945 | 9,945 | 9,945 | 9,945 | 9,945 | 11,475.03 | |||
Customer 2 | Product C | 16,000.00 | 16,000.00 | 16,000.00 | ||||||
Customer 3 | Product A | 9,651.54 | 9,651.54 | 9,651.54 | ||||||
Customer 3 | Product B | 35,915.04 | 72,817.33 | 45,659.04 | 45,659.04 | 45,659.04 | 45,659.04 | 45,659.04 | 45,659.04 | 45,659.05 |
Customer 4 | Product A | 84,229.93 | 83,219.53 | 83,219.53 | 83,219.53 | 83,219.53 | 83,219.53 | 83,219.53 | 83,219.53 | 83,219.53 |
Customer 4 | Product D | 3,258.69 | 3,258.69 | 3,258.69 | 3,258.69 | 3,258.69 | ||||
Customer 5 | Product A | 121 | 121 | 125.66 | 125.66 | 125.66 | 131.93 | 131.93 | ||
Customer 5 | Product D | 139.33 | 139.33 | 139.33 | 139.33 | 139.33 | 139.33 | 139.33 | 139.33 | 139.34 |
Customer 6 | Product D | 506.24 | 506.24 | 506.24 | 506.24 | 506.24 | 506.24 | 506.24 | 506.24 | 506.24 |
Customer 7 | Product A | 17,280 | 17,280 | 17,280 | 10,009 | 10,009 | 10,009 | 10,009.44 | ||
Customer 8 | Product A | 13,717.37 | 13,717.37 | 13,717.37 | 13,717.37 | 13,717.37 | 13,717.37 | 13,717.37 | 13,717.37 | 13,717.37 |
Customer 8 | Product B | 2,730 | 2,730 | 2,730 | 2,730 | 2,730 | 2,730 | |||
Customer 8 | Product C | 29,938.47 | 29,938.47 | 29,938.47 | 29,938.47 | 29,938.47 | 29,938.47 | 29,938.47 | 29,938.47 | 29,938.47 |
Customer 8 | Product D | 137,360.00 | 137,360.00 | 137,360.00 | 137,545.69 | 137,545.69 | 137,545.69 | 137,545.69 | 127,968.00 | 211,822.01 |
Customer 9 | Product C | 6,360.79 | 6,360.79 | 6,360.79 | 8,206.82 | 8,206.82 | 8,206.82 | 8,206.82 | 8,206.82 | 8,206.82 |
Customer 9 | Product D | 13,967.14 | 13,967.14 | 13,967.14 | 13,967.14 | 15,106.87 | 15,106.87 | 15,106.87 | 15,106.87 | 15,106.87 |
Customer 10 | Product D | 511.54 | 511.54 | 511.54 | 511.54 | |||||
Customer 11 | Product D | 389.1 | 389.1 | 389.1 | ||||||
Customer 12 | Product B | 557.68 | 557.68 | 557.68 | 557.68 | 557.68 | 557.68 | 557.68 | 557.68 | 557.68 |
Customer 12 | Product C | 1,372.07 | 1,372.07 | 1,372.07 | 1,372.07 | 1,372.07 | 1,372.07 | 1,372.07 | 1,372.07 | 1,372.07 |
Customer 13 | Product B | 7,037.76 | 7,037.76 | 7,037.76 | 7,037.76 | 7,037.76 | ||||
Customer 13 | Product C | 5,000.00 | 5,000.00 | 5,000.00 | 5,000.00 | 5,000.00 | ||||
Customer 14 | Product A | 75,930 | 75,930 | 74,031 | 74,031 | 74,031 | 74,031 | 106,877 | 106,877 | 106,877 |
Customer 14 | Product D | 1,212.55 | 1,212.55 | |||||||
Customer 15 | Product C | 3,279.09 | 3,279.09 | 3,581.44 | 3,581.44 | 3,581.44 | 3,581.44 | 3,760.49 | 3,760.49 | 3,760.51 |
Solved! Go to Solution.
You are welcome. Attached now.
Thanks for the quick work on the first part - playing with that now, and looks like it works. I haven't used the "Summarize" function before, so I would not have figured this out. Looking forward to your magic on part 2 of the question!
You are welcome. I have solved a similar problem in the attached file. 3 at the intersection of A1 and A1 tells you that 3 students answered question 1. 2 at the intersection of A1 and A2 tells you that of those 3 students, 2 also answered question 2.
User | Count |
---|---|
102 | |
92 | |
85 | |
78 | |
71 |
User | Count |
---|---|
113 | |
104 | |
101 | |
73 | |
65 |