Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I have two columns one is of ID and other is of Date, ID is repeating on different dates but I want to calculate the first count of ID,
let supose ID "111" is created on 1-08-2022, then on 2-08-2022, 3-08-2022, and 5-08-2022, but I want to show the count of ID "111" on 1-08-2022 rest of the dates count should be blank for the ID "111"
Solved! Go to Solution.
@Ubaid . Create a flag and use that in filter
a new column
flag = if([Date] = minx(filter(Table, [ID] =earlier([ID]) ), [Date]) , 1, 0)
Hi @Ubaid,
Did the above suggestions help with your scenario? if that is the case, you can consider Kudo or Accept the helpful suggestions to help others who faced similar requirements.
If these also don't help, please share more detailed information to help us clarify your scenario to test.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
Hi,
Please check the below picture and the attached pbix file.
It is for creating a measure.
Count of ID measure: =
VAR _currentdate =
MAX ( Data[Date] )
VAR _currentidlist =
VALUES ( Data[ID] )
VAR _currentidlistbeforecurrent =
SUMMARIZE (
FILTER ( ALL ( Data ), Data[ID] IN _currentidlist && Data[Date] < _currentdate ),
Data[ID]
)
VAR _currentidcount =
COUNTROWS ( _currentidlist )
VAR _beforecurrentidcount =
COUNTROWS ( _currentidlistbeforecurrent )
RETURN
IF ( HASONEVALUE ( Data[Date] ), _currentidcount - _beforecurrentidcount )
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 36 | |
| 33 | |
| 31 | |
| 28 |
| User | Count |
|---|---|
| 129 | |
| 88 | |
| 79 | |
| 68 | |
| 63 |