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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

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)))

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors