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 data similar to the following:
ID | Date |
A | 01/01/2020 |
A | 02/01/2020 |
A | 03/01/2020 |
B | 04/01/2020 |
B | 05/01/2020 |
C | 06/01/2020 |
How can I count the number of instances a unique ID appears less than 3 times.
E.g. both B and C occur less than 3 times in the ID column, A does not, so the expected result would be '2'.
Solved! Go to Solution.
@lightw0rks , Try a measure like
Measure =
var _instance =3
return
countx(filter(summarize(Table,table[ID],"_1" ,count(table[Date])),[_1]<_instance),[ID])
_instance can come from a what if parameter
Hi @lightw0rks ,
Try this measure
Measure 3 =
var _table =
SUMMARIZE('Table','Table'[ID], "_1", COUNTA('Table'[ID]))
RETURN
COUNTROWS(FILTER(_table, [_1] >=2))
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
Thanks guys, both those solutions work!
Hi @lightw0rks ,
Try this measure
Measure 3 =
var _table =
SUMMARIZE('Table','Table'[ID], "_1", COUNTA('Table'[ID]))
RETURN
COUNTROWS(FILTER(_table, [_1] >=2))
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
@lightw0rks , Try a measure like
Measure =
var _instance =3
return
countx(filter(summarize(Table,table[ID],"_1" ,count(table[Date])),[_1]<_instance),[ID])
_instance can come from a what if parameter
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 |
---|---|
114 | |
99 | |
82 | |
70 | |
60 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |