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 am trying to make a distinct count table that shows how many new grant proposals were awarded in a given month. The issue that some grants are listed multiple times when a modification is awarded. However, we do not count this as a new award and it should not be counted twice. I used this measure to determine the distinct number of awards:
This is the table visualization you get by my measure:
The Values should be:
Jan-2020: 3
Feb-2020: 0
Jan-2021: 1
Let me know if any further information is needed.
Solved! Go to Solution.
It seems that you want a count of 'new' awards.
Try this:
Award Distinct Count =
VAR CurrDate = MIN ( 'Table'[Date] )
VAR CurrAwards = VALUES ( 'Table'[Award Number] )
VAR PrevAwards =
CALCULATETABLE (
VALUES ( 'Table'[Award Number] ),
ALL ( 'Table' ),
'Table'[Date] < CurrDate
)
RETURN
COUNTROWS ( EXCEPT ( CurrAwards, PrevAwards ) )
This takes the prizes in the current month, deletes the previously existing ones and counts the remaining ones.
It seems that you want a count of 'new' awards.
Try this:
Award Distinct Count =
VAR CurrDate = MIN ( 'Table'[Date] )
VAR CurrAwards = VALUES ( 'Table'[Award Number] )
VAR PrevAwards =
CALCULATETABLE (
VALUES ( 'Table'[Award Number] ),
ALL ( 'Table' ),
'Table'[Date] < CurrDate
)
RETURN
COUNTROWS ( EXCEPT ( CurrAwards, PrevAwards ) )
This takes the prizes in the current month, deletes the previously existing ones and counts the remaining ones.
That worked! Thanks for the help!
I don't quite follow your example. Why should Jan-2020 be 3?
My bad. It should only be two. Sorry for the confusion.
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 |
---|---|
112 | |
97 | |
84 | |
67 | |
60 |
User | Count |
---|---|
150 | |
120 | |
99 | |
87 | |
68 |