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
BruceA02
New Member

Daily change measure broken as there are data gaps in time series - IF statement, or SWITCH?

Hi all and good morning,

I have a simple calculation - easy to create using the "quick measure".

So I created the daily change in my value (OPINT_1). The problem is I'm using a Date Table which I link to my data. As the data is financial data (options) there are gaps for holidays and weekends, so my "simple measure" is Too simple and my output is a mess. I started playing with IF statements but failed 😞 

The question is, how do I ignore the blank values (dates) and get a consistent time series of daily change of actual values in the data table.

Thank you for any suggestions

 

The Date/COMEX GOLD OPINT relationship

BruceA02_1-1652269149673.png

 

THE OPINT DATA

BruceA02_0-1652269112406.png

 

My "quick measure"

BruceA02_2-1652269328639.png

WHICH RETURNS THE TABLE BELOW (for one, random Instrument)

BruceA02_3-1652269389119.png

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@BruceA02 , You can try Last Day Non Continuous 

 

example

Last Day Non Continuous = CALCULATE([sales],filter(ALLSELECTED('Date'),'Date'[Date] =MAXX(FILTER(ALLSELECTED('Date'),'Date'[Date]<max('Date'[Date])),'Date'[Date])))

or

 

Last Day Non Continuous = CALCULATE([sales],filter(ALLSELECTED('Date'),'Date'[Date] =calculate( max(Sales[Sales Date]), FILTER(ALLSELECTED('Date'),'Date'[Date]<max('Date'[Date])))))

 

 

refer

Day Intelligence - Last day, last non continous day
https://medium.com/@amitchandak.1978/power-bi-day-intelligence-questions-time-intelligence-5-5-5c324...

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

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@BruceA02 , You can try Last Day Non Continuous 

 

example

Last Day Non Continuous = CALCULATE([sales],filter(ALLSELECTED('Date'),'Date'[Date] =MAXX(FILTER(ALLSELECTED('Date'),'Date'[Date]<max('Date'[Date])),'Date'[Date])))

or

 

Last Day Non Continuous = CALCULATE([sales],filter(ALLSELECTED('Date'),'Date'[Date] =calculate( max(Sales[Sales Date]), FILTER(ALLSELECTED('Date'),'Date'[Date]<max('Date'[Date])))))

 

 

refer

Day Intelligence - Last day, last non continous day
https://medium.com/@amitchandak.1978/power-bi-day-intelligence-questions-time-intelligence-5-5-5c324...

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

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!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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.