Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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))
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
42 | |
26 | |
22 | |
13 | |
8 |
User | Count |
---|---|
75 | |
50 | |
47 | |
17 | |
17 |