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
KristofDM
Frequent Visitor

Prevent future calculations in a measure

I made a measure to calculate efficiency. It works ok but as soon as future quarters are added to the filter section of the report, the measure shows 100 efficiency (1) . Is there a way to prevent logic from being triggered on future data that is actually non-existent?
As i start the measure with 1-, the result is 1 if no data is returned.

 

any idea would be greatly appreciated! ps: I indeed stole the formula from an excel sheet 🙂 

 

 

PBIQUestion.jpg

 


testmeasure= 1-(DIVIDE(
  (SUM
   (table[xdays])
   ),
  (SUM
   (table[Durationday])
   -SUM(TABLE[OtherDay])
   )
  )
 )

 

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

@KristofDM - 

 

Try something along the lines of:

 

 

testmeasure= 
VAR __measure = 
1-(DIVIDE(
  (SUM
   (table[xdays])
   ),
  (SUM
   (table[Durationday])
   -SUM(TABLE[OtherDay])
   )
  )
 )
RETURN
  IF(<some condition that identifies future>,BLANK(),__measure)

 

For example, the condition could be MAX('Table'[Date]) > TODAY()

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@KristofDM , something like this

testmeasure= calculate(1-(DIVIDE(
(SUM
(table[xdays])
),
(SUM
(table[Durationday])
-SUM(TABLE[OtherDay])
)
)
), date[date] <today())

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
Greg_Deckler
Community Champion
Community Champion

@KristofDM - 

 

Try something along the lines of:

 

 

testmeasure= 
VAR __measure = 
1-(DIVIDE(
  (SUM
   (table[xdays])
   ),
  (SUM
   (table[Durationday])
   -SUM(TABLE[OtherDay])
   )
  )
 )
RETURN
  IF(<some condition that identifies future>,BLANK(),__measure)

 

For example, the condition could be MAX('Table'[Date]) > TODAY()

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

thank you all for your sugestions, the VAR __measure was indeed what i was missing!

thanks @Greg_Deckler 

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.