Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
I need your help with a DAX measure to generate a count of distinct first-time listing each brand for the selected period.
My data model is in Power Pivot(I will appreciate a measure that will work in PowerBi & PowerPivot), and when I create a table with Month Name on the columns, each outlet should only be counted once (First time purchase) which is captured on the 'Listing Date" column.
The total rows and columns should reflect the overall distinct count.
The code in the image attached works (got help from Copilot), but I was wondering if there is an alternative thatโs easier to follow.
The relationship between the calendar table and Document Listing table is on "Date' column while the first listing date is on the listing date column.
I'm open to all solutions including the possibility of achieving the result with the date column.
Thank you.
Hi @Nelson-Mwangi,
Can you please provide sample data in a usable format (not a screenshot)?
If you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, mark this post as the solution.
Unfortunately, this is my first post I'm not allowed to attach files.
The snip below has a sample data and the relationship - Hope that helps.
Hi @Nelson-Mwangi,
Please see this post for how to provide sample data:
How to provide sample data in the Power BI Forum - Microsoft Fabric Community
Also take a look at this post:
(1) How to Get Your Question Answered Quickly - Microsoft Fabric Community
If you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, please mark this post as the solution.
| Customer Code | Customer Name | Brand | ListingDate | Product Code | Salesman | Date | Sales |
| KE0064975 | Fenix Liquors Store, Kitale | Don Julio | 01/07/2025 | 636328 | Kitale Counter | 01/07/2025 | 0.17 |
| KE0064975 | Fenix Liquors Store, Kitale | Don Julio | 01/07/2025 | 636328 | Titus Peter | 01/08/2025 | 0.17 |
| KE0064975 | Fenix Liquors Store, Kitale | Don Julio | 01/07/2025 | 636349 | Janet Cheruiyot | 01/08/2025 | 0.17 |
| KE0138196 | Swam W&S,Kitale | Don Julio | 01/07/2025 | 636349 | Titus Peter | 01/07/2025 | 0.5 |
| KE0141961 | Bonile wines ktl | Don Julio | 01/07/2025 | 636328 | Kitale Counter | 01/07/2025 | 0.33 |
| KE0141961 | Bonile wines ktl | Don Julio | 01/07/2025 | 636350 | Kitale Counter | 01/07/2025 | 0.17 |
| KE0149467 | Lion Liquor Store, Kibomet | Don Julio | 01/08/2025 | 636328 | Kitale Counter | 01/08/2025 | 0.17 |
| KE0152923 | Kitale Club,Kitale Town | Don Julio | 01/08/2025 | 636349 | Kitale Counter | 01/08/2025 | 0.17 |
| KE0152923 | Kitale Club,Kitale Town | Don Julio | 01/08/2025 | 636328 | Dennis Memba | 01/09/2025 | 0.33 |
| KE0156529 | Alaska Bar,Sibanga | Don Julio | 01/08/2025 | 636349 | Janet Cheruiyot | 01/08/2025 | 0.17 |
| KE0034887 | Sirwo Resort, Kapcherop | Gordons Dry Gin | 01/07/2025 | 716210 | Kitale Counter | 01/08/2025 | 0.08 |
| KE0034887 | Sirwo Resort, Kapcherop | Gordons Dry Gin | 01/07/2025 | 716210 | Jasron Anyasi | 01/07/2025 | 0.08 |
| KE0034887 | Sirwo Resort, Kapcherop | Gordons Dry Gin | 01/07/2025 | 716210 | Jasron Anyasi | 01/07/2025 | 0.17 |
| KE0034887 | Sirwo Resort, Kapcherop | Gordons Dry Gin | 01/07/2025 | 716210 | Jasron Anyasi | 01/08/2025 | 0.17 |
| KE0034887 | Sirwo Resort, Kapcherop | Gordons Dry Gin | 01/07/2025 | 763807 | Jasron Anyasi | 01/08/2025 | 0.12 |
| KE0034887 | Sirwo Resort, Kapcherop | Gordons Dry Gin | 01/07/2025 | 716210 | Jasron Anyasi | 01/09/2025 | 0.17 |
| Customer Code | Customer Name | Brand | ListingDate | Product Code | Salesman | Date | Sales |
| KE0064975 | Fenix Liquors Store, Kitale | Don Julio | 01/07/2025 | 636328 | Kitale Counter | 01/07/2025 | 0.17 |
| KE0064975 | Fenix Liquors Store, Kitale | Don Julio | 01/07/2025 | 636328 | Titus Peter | 01/08/2025 | 0.17 |
| KE0064975 | Fenix Liquors Store, Kitale | Don Julio | 01/07/2025 | 636349 | Janet Cheruiyot | 01/08/2025 | 0.17 |
| KE0138196 | Swam W&S,Kitale | Don Julio | 01/07/2025 | 636349 | Titus Peter | 01/07/2025 | 0.5 |
| KE0141961 | Bonile wines ktl | Don Julio | 01/07/2025 | 636328 | Kitale Counter | 01/07/2025 | 0.33 |
| KE0141961 | Bonile wines ktl | Don Julio | 01/07/2025 | 636350 | Kitale Counter | 01/07/2025 | 0.17 |
| KE0149467 | Lion Liquor Store, Kibomet | Don Julio | 01/08/2025 | 636328 | Kitale Counter | 01/08/2025 | 0.17 |
| KE0152923 | Kitale Club,Kitale Town | Don Julio | 01/08/2025 | 636349 | Kitale Counter | 01/08/2025 | 0.17 |
| KE0152923 | Kitale Club,Kitale Town | Don Julio | 01/08/2025 | 636328 | Dennis Memba | 01/09/2025 | 0.33 |
| KE0156529 | Alaska Bar,Sibanga | Don Julio | 01/08/2025 | 636349 | Janet Cheruiyot | 01/08/2025 | 0.17 |
| KE0034887 | Sirwo Resort, Kapcherop | Gordons Dry Gin | 01/07/2025 | 716210 | Kitale Counter | 01/08/2025 | 0.08 |
| KE0034887 | Sirwo Resort, Kapcherop | Gordons Dry Gin | 01/07/2025 | 716210 | Jasron Anyasi | 01/07/2025 | 0.08 |
| KE0034887 | Sirwo Resort, Kapcherop | Gordons Dry Gin | 01/07/2025 | 716210 | Jasron Anyasi | 01/07/2025 | 0.17 |
| KE0034887 | Sirwo Resort, Kapcherop | Gordons Dry Gin | 01/07/2025 | 716210 | Jasron Anyasi | 01/08/2025 | 0.17 |
| KE0034887 | Sirwo Resort, Kapcherop | Gordons Dry Gin | 01/07/2025 | 763807 | Jasron Anyasi | 01/08/2025 | 0.12 |
| KE0034887 | Sirwo Resort, Kapcherop | Gordons Dry Gin | 01/07/2025 | 716210 | Jasron Anyasi | 01/09/2025 | 0.17 |
Thank you for reaching out to the Microsoft Fabric Forum Community.
Based on my understanding, could you please try the following DAX? It might be helpful.
If I misunderstand your needs or you still have problems on it, please feel free to let us know.
Thanks.
Thank you for reaching out to the Microsoft Fabric Forum Community.
I hope the information provided was helpful. If you still have questions, please don't hesitate to reach out to the community.
| First-Time ListingsCalc | Column Labels | |||
| Row Labels | July | August | September | Grand Total |
| Bulleit Bourbon | 3 | 3 | ||
| Casamigos | 2 | 1 | 3 | |
| Don Julio | 7 | 4 | 1 | 10 |
| Gordons Dry Gin | 23 | 24 | 9 | 42 |
| JW Black Label | 101 | 104 | 80 | 141 |
| JW Blonde | 20 | 35 | 16 | 59 |
| JW Gold Reserve | 3 | 3 | ||
| JW Red Label | 100 | 92 | 76 | 137 |
| Singleton | 15 | 18 | 4 | 27 |
| Tanq Ten | 2 | 1 | 3 | |
| Tanqueray LDG | 3 | 7 | 2 | 10 |
| Grand Total | 277 | 287 | 189 | 438 |
Sorry for the delayed response. The measure returns the correct totals but monthly count is not unique.