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
Anonymous
Not applicable

Days remaining based on the slicer Month/Months picked

Hi,

 

I have need a measure on days remaning based on the month or months selected in the slicer 

 

1. If month is previous month the days remaining would be 0 

2. If mont is current month the days remaining would be total days in month minus days passed in the month

3. If month is future month the days remaining would be Total days in the month 

 

If Current month and future month is selcted then the remaning days would be 2 +3 

 

1 REPLY 1
Anonymous
Not applicable

@Anonymous 

 

Can you try the below and let me know whether it matches your requirement

 

No of Days = IF(
SELECTEDVALUE('Table'[Date].[MonthNo])<MONTH(Today()),
0,
IF(
SELECTEDVALUE('Table'[Date].[MonthNo])=MONTH(Today()),
EOMONTH(Today(),0)-Today(),
(EOMONTH(Today(),0)-Today())+(EOMONTH(DATE(YEAR(Today()),SELECTEDVALUE('Table'[Date].[MonthNo]),1),0)-Today())))

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.