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
kumsha1
Post Patron
Post Patron

show 0 variance for future dates

Hi,

 

We have below calculated measures in direct query model. Currently the variance is showing negative values for future dates. Can someone help how can we make the future dates variance values to 0. TIA.

 

kumsha1_0-1633506219556.png

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@kumsha1 , Try measure

if(isblank([M1]), blank(), [M1] -[M2])

 

or

 

Sumx(values(Table[Date]), if(isblank([M1]), blank(), [M1] -[M2]) )

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

4 REPLIES 4
Tahreem24
Super User
Super User

@kumsha1 You can create a measure like below:

Measure = If(Sum(Table[M1])=BLANK(),0,Sum(Table[M1]-Table[M2])

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard
amitchandak
Super User
Super User

@kumsha1 , Try measure

if(isblank([M1]), blank(), [M1] -[M2])

 

or

 

Sumx(values(Table[Date]), if(isblank([M1]), blank(), [M1] -[M2]) )

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

Hi @amitchandak , i changed the calc to show 0, so the line grapgh can show future dates when just variance is used.

Thank you @amitchandak 

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.