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.
Hi guys,
I have a table like this, imported from a CSV (I'm sorry I've not been able to render the table better than this):
item | year | column3 | column4 |
alpha | 1980 | ||
beta | 2000 | ||
gamma | 2005 | ||
alpha | 2000 | ||
alpha | 2002 | ||
gamma | 1999 | ||
beta | 2000 | ||
beta | 2000 | ||
alpha | 1980 |
Column3 and 4 contain other data not so relevant to the thread.
I need to calculate how many items have a distinct count for year > 1.
With this data, the result would be 2, because for item "alpha" the distinct count is 3, for "beta" it's 1 and for "gamma" it's 2.
I can easily calculate it with a table visual, but I need a card, just the number. I've tried to come up with a solution, but I can't figure out where to start
Could you please help me?
Solved! Go to Solution.
you can try this
Measure =
VAR _tbl=SUMMARIZE('Table','Table'[item],"count",DISTINCTCOUNT('Table'[year]))
return COUNTROWS(FILTER(_tbl,[count]>1))
Proud to be a Super User!
you can try this
Measure =
VAR _tbl=SUMMARIZE('Table','Table'[item],"count",DISTINCTCOUNT('Table'[year]))
return COUNTROWS(FILTER(_tbl,[count]>1))
Proud to be a Super User!
yes!! 😀 this is what I was looking for.
Thanks for your help in finding the solution and the logic behind it 😊
you are welcome
Proud to be a Super User!
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 |
---|---|
107 | |
93 | |
77 | |
65 | |
53 |
User | Count |
---|---|
147 | |
106 | |
104 | |
87 | |
61 |