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.
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))
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 |
---|---|
20 | |
7 | |
6 | |
5 | |
5 |
User | Count |
---|---|
26 | |
10 | |
10 | |
9 | |
6 |