Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! 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?
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 51 | |
| 40 | |
| 37 | |
| 14 | |
| 14 |
| User | Count |
|---|---|
| 85 | |
| 69 | |
| 38 | |
| 29 | |
| 27 |