Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi community,
I want to the count of unique invoices in a invoice columns
Invoice eg:
2023/Q3/141
2023/Q3/143
But there is a catch,
If the invoice numbers are like,
2023/Q3/145/1
2023/Q3/145/2
These should be counted as one as well.
Need some help.
Thanks and regards,
Rishab jain
@parry2k Thanks for helping me with 3 rolling averages formula.
Solved! Go to Solution.
Hi,
Thank you for a quick response!
I have tried this but it will not take 2023/Q3/251/1
2023/Q3/251/2 has single count.
so both formats exist?
InvoiceNumber = 2023/Q3/145
Is this a sub invoice? 2023/Q3/145/2 with the extra "/2"
If you want the following to return a distinct count of 1.....
2023/Q3/145/1
2023/Q3/145/2
2023/Q3/145/3
2023/Q3/145/4
2023/Q3/145/5
DistinctCount should work. But you need to add new column that trims the InvoiceNumber down to the actual Invoice number (lets call it RootInvoiceNumber) to run the distinct count on. Example:
InvoiceNumber , RootInvoiceNumber
2023/Q3/145/1 , 2023/Q3/145
2023/Q3/145/2 , 2023/Q3/145
2023/Q3/145/3 , 2023/Q3/145
2023/Q3/145/4 , 2023/Q3/145
2023/Q3/145/5 , 2023/Q3/145
so both formats exist?
InvoiceNumber = 2023/Q3/145
Is this a sub invoice? 2023/Q3/145/2 with the extra "/2"
If you want the following to return a distinct count of 1.....
2023/Q3/145/1
2023/Q3/145/2
2023/Q3/145/3
2023/Q3/145/4
2023/Q3/145/5
DistinctCount should work. But you need to add new column that trims the InvoiceNumber down to the actual Invoice number (lets call it RootInvoiceNumber) to run the distinct count on. Example:
InvoiceNumber , RootInvoiceNumber
2023/Q3/145/1 , 2023/Q3/145
2023/Q3/145/2 , 2023/Q3/145
2023/Q3/145/3 , 2023/Q3/145
2023/Q3/145/4 , 2023/Q3/145
2023/Q3/145/5 , 2023/Q3/145
After you suggested to create a new column..... I open power query and used display 0 or 1 if we have certain condition and then used that column to set a condition for split based of delimiter. Thank you for your help
Hi,
Thank you for a quick response!
I have tried this but it will not take 2023/Q3/251/1
2023/Q3/251/2 has single count.
@rishabjain237 Seems like DISTINCTCOUNT or COUNTROWS(DISTINCT(SELECTCOLUMNS( ... ) ) ) should work for this.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
65 | |
64 | |
56 | |
39 | |
27 |
User | Count |
---|---|
85 | |
59 | |
45 | |
43 | |
38 |