Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Hi, I wanted to count the product based on the type defined below:
Each product should be counted as one in each month. How to create such measure?
| Product | Term | Contract Start Date | Contract End Date | Installed Date |
| A | Purchased | 02/13/2022 | 01/12/2023 | 01/10/2019 |
| A | Warranty | 1/13/2021 | 02/12/2022 | 01/10/2019 |
| B | Rental | 02/23/2022 | 02/22/2026 | 05/11/2009 |
| B | Warranty | 02/23/2021 | 02/22/2022 | 05/11/2009 |
| C | Rental | 05/01/2021 | 03/28/2022 | 05/09/2019 |
| C | Rental | 09/29/2020 | 04/30/2021 | 05/09/2019 |
| D | Warranty | 3/31/2021 | 03/30/2022 | 05/09/2019 |
| D | Purchased | 3/31/2022 | 03/30/2026 | 05/09/2019 |
| E | 02/13/2021 | |||
| F | Purchased | 01/13/2021 | 01/12/2022 | 01/10/2019 |
| F | Warranty | 1/13/2020 | 01/12/2021 | 01/10/2019 |
| G | Warranty | 01/13/2021 | 03/12/2022 | 01/10/2019 |
| H | Purchased | 12/13/2020 | 02/12/2022 | 01/10/2019 |
| I | 03/13/2022 |
Expected Output:
| Type | 2022-02 | 2022-03 |
| Rental | 1 (C) | 2 (B,C) |
| Contract | 1 (H) | 1 (A) |
| Warranty | 4 (A,B,D,G) | 2 (D,G) |
| T&M | 2 (E,F) | 4 (E,F,H,I) |
Sample pbix here. If a product is valid for both "Contract" & Warranty" in the same period, it should count only "Warranty" for that product. If a product is valid for both "Rental" & "Warranty" in the same month, it should count only "Warranty" for that product. How to do so?
The sum for T&M is incorrect? How to fix it?
@PBI_newuser , I think this approach of HT blog with active inactive join should help. What you need is very similar to Active employees
Hi @amitchandak , thank you for your suggestion.
I have created some measures in this sample pbix file. If a product is valid for both "Contract" & Warranty" in the same period, how to count only "Warranty" for that product. (E.g. Product A in 2022-02 and Product D in 2022-03) If a product is valid for both "Rental" & "Warranty" in the same month, how to count only "Warranty" for that product. (E.g. Product B in 2022-02)
Besides, the sum for T&M is incorrect? How to fix it?
If 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.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 55 | |
| 35 | |
| 31 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 75 | |
| 72 | |
| 38 | |
| 35 | |
| 25 |