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
lcDandjinou
Regular Visitor

DAX NB

Hello,
I have a problem:
on power bi I have a table that contains several columns and among these columns, I have a measure that determines the number of vehicles planned/synchronized.
Here is the formula for measuring the number of planned/synchronized vehicles:

 

Nbr_VHS_ScheduledSynchronized = CALCULATE(SUM('db_infocentre PX_installCR'[nb_box]), OR('db_infocentre PX_intervention'[status]="IN_PROGRESS" , 'db_infocentre PX_intervention'[status]="SCHEDULED"))


My goal is to determine from today's date the number of vehicles planned/synchronized in the current month, in month m+1, in month m+2, m+3, m+4 and m+x. I want to determine them from the current date and add them in my table as a column. So if in 2 months I consult my table, I want it to show me these numbers according to the date in which we are.

 

5 REPLIES 5
amitchandak
Super User
Super User

@lcDandjinou , based on what I got so far, new measures like

 

Nbr_VHS_ScheduledSynchronized remining for this month = CALCULATE(SUM('db_infocentre PX_installCR'[nb_box]), filter('db_infocentre PX_intervention', OR('db_infocentre PX_intervention'[status]="IN_PROGRESS" , 'db_infocentre PX_intervention'[status]="SCHEDULED") && 'db_infocentre PX_intervention'[Date] >= Today() && 'db_infocentre PX_intervention'[date] <= eomonth(Today(), 0)))

 

Nbr_VHS_ScheduledSynchronized remining till next month = CALCULATE(SUM('db_infocentre PX_installCR'[nb_box]), filter('db_infocentre PX_intervention', OR('db_infocentre PX_intervention'[status]="IN_PROGRESS" , 'db_infocentre PX_intervention'[status]="SCHEDULED") && 'db_infocentre PX_intervention'[Date] >= Today() && 'db_infocentre PX_intervention'[date] <= eomonth(Today(), 1)))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

for month +2 is it : 

 

Nbr_VHS_ScheduledSynchronized remining till next month = CALCULATE(SUM('db_infocentre PX_installCR'[nb_box]), filter('db_infocentre PX_intervention', OR('db_infocentre PX_intervention'[status]="IN_PROGRESS" , 'db_infocentre PX_intervention'[status]="SCHEDULED") && 'db_infocentre PX_intervention'[Date] >= Today() && 'db_infocentre PX_intervention'[date] <= eomonth(Today(), 2)))

Okay thank you. What means  : eomonth(Today(), 1)))

Anonymous
Not applicable

EOMONTH returns the date in datetime format of the last day of the month before or after a specified number of months.
So eomonth(Today(), 1) returns the last date of the next month with respect to the current month.

Okay, and if I want to do Nbr_VHS_ScheduledSynchronized remining month+x, do you have idea of how can I do?

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.