Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
joaquinel
Helper I
Helper I

Count IDs when exist in a previous month

I need to count the registers (idpersona) of a month if that id exist in the previous month as in example bellow

 

ididpersonafecha
13401/04/2023
2301/04/2023
3501/04/2023
43401/05/2023
5301/05/2023
6501/05/2023
7401/05/2023

 

so, the result must be 3.

 

My (wrong) formula is

 

CALCULATE
                        (
                            COUNT(
                                Pagos[IdPersona]
                                 )
                                 ,
                                 Filter
                                    (Pagos,
                                    Pagos[IdPersona] && PREVIOUSMONTH('1CalFCobro'[Date])
                                    )
                          )

 

Could you, please, help me. Thanks

1 REPLY 1
Ahmedx
Super User
Super User

Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.

https://1drv.ms/u/s!AiUZ0Ws7G26Rh3KHAmhL66JHK2PA?e=UfZi30

Screen Capture #1043.pngScreen Capture #1044.png

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.