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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello PBI Community.
I am having difficulty creating a DAX measure that combines s the following distinct and non-distinct attributes within the same Matrix:
In my table ('020_BOS') :
I need both my matrix's subtotal and total counts to equal 10,664 – which reflects the attributes of the 10,660 distinct PO's combined with the attributes of the first [SID#] for the 4, non-distinct PO's.
My DESIRED MATRIX is as follows with both subtotals and totals reflecting 10,664 Purchase Orders:
The Original Matrix (using the implicit "Count" option for PO#) is as follows:
The Original Matrix (using implicit "Count (Distinct)" option for PO#) is as follows:
NOTES:
Examples:
Thanks in advance for any assistance, advice, or insights you could offer.
Solved! Go to Solution.
@Anonymous
Basically, you're wanting to only view the first shipment values; there's a few ways you could do this.
If you're wanting a DAX only approach, try this where you define your variables within the COUNTROWS function:
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
@Anonymous
Basically, you're wanting to only view the first shipment values; there's a few ways you could do this.
If you're wanting a DAX only approach, try this where you define your variables within the COUNTROWS function:
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
Thank you so much Allison... your code gave me precisely what I was seeking!!
As of today, you are officially my hero. 🙂
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!