Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
I'm new in power bi and in need of help on how I can do this in matrix. I need a produce these on thousands of data but in simple terms my table looks like the following
Table1
| Date | Product | Sales |
| 01/01/2019 | Soap | 100 |
| 01/05/2019 | Shampoo | 50 |
| 01/07/2019 | Shampoo | 150 |
| 01/20/2019 | Soap | 250 |
| 01/22/2019 | Soap | 300 |
Table2
| Product | Month | Quota |
| Soap | January | 200 |
| Soap | February | 300 |
| Shampoo | January | 50 |
| Shampoo | February | 100 |
I need a matrix that looks like this
| x | Jan | Jan | Feb | Feb | Total | Total |
| x | Quota | Actual | Quota | Actual | Quota | Actual |
| Shampoo | 50 | 200 | 100 | 0 | 150 | 200 |
| Soap | 200 | 650 | 300 | 0 | 500 | 650 |
| Total | 250 | 850 | 400 | 0 | 650 | 850 |
I hope someone can help, thanks.
Solved! Go to Solution.
Hi @shalnark0727,
Create a calendar table and Products table and make a one to many relationship between these tables and the other two, then just create the following to measure to use on your matrix:
Quota Total = SUM(Table2[Quota]) Sales Total = IF(SUM(Table2[Quota]) = BLANK();BLANK(); SUM(Table1[Sales]) + 0)
Check PBIX file attach.
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @shalnark0727,
Create a calendar table and Products table and make a one to many relationship between these tables and the other two, then just create the following to measure to use on your matrix:
Quota Total = SUM(Table2[Quota]) Sales Total = IF(SUM(Table2[Quota]) = BLANK();BLANK(); SUM(Table1[Sales]) + 0)
Check PBIX file attach.
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @shalnark0727,
Create a calendar table and Products table and make a one to many relationship between these tables and the other two, then just create the following to measure to use on your matrix:
Quota Total = SUM(Table2[Quota]) Sales Total = IF(SUM(Table2[Quota]) = BLANK();BLANK(); SUM(Table1[Sales]) + 0)
Check PBIX file attach.
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsIf you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.
| User | Count |
|---|---|
| 47 | |
| 44 | |
| 40 | |
| 20 | |
| 15 |
| User | Count |
|---|---|
| 70 | |
| 68 | |
| 32 | |
| 27 | |
| 25 |