Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
HELLO,
I want to create a DAX formula that will calculate the total UNIQUE products by Month and Availabilty using the table below.
So one formula will calculate total unique products for Online and this should give a value of 5 and for Instore it should give a value of 6.
I started by using the CALCULATE Function below but I don't know how to factor in finding the unique products by month:
Total Unique Products for Online = CALCULATE(DISTINCTCOUNT(Products[Product ID]),Products[Availability]="Online",
Please can someone kindly help me out with this.
Thanks in Advance!
Solved! Go to Solution.
@JRA21_13_19_25 Try:
Measure =
VAR __Table = SELECTCOLUMNS('Table',"Month",[Month],"Product ID",[Product ID],"Availability",[Availability])
RETURN
COUNTROWS(DISTINCT(__Table))
This seems like a good situation for SUMMARIZE.
Measure1 =
COUNTROWS (
SUMMARIZE ( Table1, Table1[Month], Table1[Product ID], Table1[Availability] )
)
@JRA21_13_19_25 Try:
Measure =
VAR __Table = SELECTCOLUMNS('Table',"Month",[Month],"Product ID",[Product ID],"Availability",[Availability])
RETURN
COUNTROWS(DISTINCT(__Table))
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 13 | |
| 9 | |
| 9 | |
| 8 | |
| 7 |