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
Syndicate_Admin
Administrator
Administrator

Total of a column in a period in a specific time

Hello Community!


Here giving can again, heh! I hope they are fine, I have been investigating but I can no longer find answers and maybe they can guide me, I tell you about my problem, I have a column that brings me the recidivism of a type of report, however this time I need to extract the total of them in a specific period, in this case October, I have tried to apply this, but it doesn't give me any results:

CALCULATE( [ReincidenciaA], DATESBETWEEN ('reportes reportes_all'[fecha_alta], DATE(2021, 09, 30), DATE(2021, 11, 01))


In advance I thank you

Best regards

1 ACCEPTED SOLUTION
VahidDM
Super User
Super User

Hi @Syndicate_Admin 

 

First, It's better if you add a Date Table to your report: https://www.vahiddm.com/post/creating-calendar-table-with-3-steps

 

Test this:

CALCULATE( [ReincidenciaA], FILTER ( ALL( 'reportes reportes_all' ), 'reportes reportes_all'[fecha_alta]>DATE(2021, 09, 30) &&'reportes reportes_all'[fecha_alta]< DATE(2021, 11, 01)))

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: 
www.linkedin.com/in/vahid-dm/

 

 

 

View solution in original post

5 REPLIES 5
Ashish_Mathur
Super User
Super User

Hi,

You must first create a Calendar Table with a relationship from the Date column of your Data Table to the Date column of your Calendar Table.  In the Calendar Table, write calculated column formulas to extract Year, Month name and Month number.  Sort the Month name by the Month number.  To your visual/filter/slicers, drag Year/Month name from the Calendar Table.  Your measure should look something like this

=CALCULATE( [ReincidenciaA], DATESBETWEEN (Calendar[Date], DATE(2021, 09, 30), DATE(2021, 11, 01))

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Syndicate_Admin
Administrator
Administrator

🎉🎉Thank you very much! 😊👍

I was able to implement it, I just wanted to check the link that you leave me but it does not allow me to access.

I thank you infinitely

Best regards

Sorry I did not get that! Access to file?or code?


Appreciate your Kudos!!
LinkedIn: 
www.linkedin.com/in/vahid-dm/

 

 

I refer to this link, it does not let me access:

First, it's best if you add a date table to your report: https://www.vahiddm.com/post/creating-calendar-table-with-3-steps

VahidDM
Super User
Super User

Hi @Syndicate_Admin 

 

First, It's better if you add a Date Table to your report: https://www.vahiddm.com/post/creating-calendar-table-with-3-steps

 

Test this:

CALCULATE( [ReincidenciaA], FILTER ( ALL( 'reportes reportes_all' ), 'reportes reportes_all'[fecha_alta]>DATE(2021, 09, 30) &&'reportes reportes_all'[fecha_alta]< DATE(2021, 11, 01)))

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: 
www.linkedin.com/in/vahid-dm/

 

 

 

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.