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.
I have the following table:
Item ID | Date |
6 | 01/01/2020 |
6 | 01/01/2020 |
7 | 01/01/2020 |
7 | 01/01/2020 |
7 | 01/01/2020 |
5 | 02/02/2020 |
6 | 02/02/2020 |
6 | 02/02/2020 |
6 | 02/02/2020 |
7 | 02/02/2020 |
I need to create a measure that will sum how many times an Item ID appeared in one day so I can have a table like this:
Date | Item ID | Instances |
01/01/2020 | 6 | 2 |
01/01/2020 | 7 | 3 |
02/02/2020 | 5 | 1 |
02/02/2020 | 6 | 3 |
02/02/2020 | 7 | 1 |
Thanks
Solved! Go to Solution.
@Anonymous , That you can have a simple count measure
count(Table[Item ID])
But you need a sum of distinct ID on a date, you need like this
sumx(values(Table[Date]), distinctcount(Table[Item ID]))
Hi @Anonymous ,
Create a measure like this:
Measure = CALCULATE(COUNTROWS('Table'),ALLEXCEPT('Table','Table'[Date],'Table'[Item]))
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , That you can have a simple count measure
count(Table[Item ID])
But you need a sum of distinct ID on a date, you need like this
sumx(values(Table[Date]), distinctcount(Table[Item ID]))
You should be able to make a table visual that has Date and Item ID, and then add either column again but with an aggregation of count. Or you can make a measure like ID Count = COUNT(Table[Item ID]) and add that.
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
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 |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
93 | |
84 | |
66 |