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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
EDDYYC
Frequent Visitor

Variable change

Hi guys,

 

Hoping you can help me out with this, i have two tables, one table contains the dates where a product was tested, the other table daily operations, 

 

tested:

EDDYYC_0-1622479124702.png

 

and the daily production:

EDDYYC_2-1622479263738.png

 

 

i am having issues with the following task, as you can see in the daily prod table there is a _Log date measure, the logic is the first value of the first table is 2021-05-26, so everything equal or above that day performs a calculation, now what i need now is once the date is equal to that date then the variable will change it is value to the next day in the testing table which is 2021-05-19, so everything above the 19 but below the 26th performs a different actions, here an example of the desired result:

 

EDDYYC_3-1622479604412.png

 

i tried this but not success:

 

_Log Date =
VAR _LOG = CALCULATE( MAX( 'Rod Pumps'[Log Date]))
RETURN SWITCH(TRUE(),
_LOG >= [_last test], [_New Pump Eff],
_LOG = CALCULATE( MAX( 'Well tests ALL (PVUNITCOMPTEST)'[Testing Date]), FILTER('Well tests ALL (PVUNITCOMPTEST)', 'Well tests ALL (PVUNITCOMPTEST)'[Testing Date] < _LOG)))
1 REPLY 1
v-yingjl
Community Support
Community Support

Hi @EDDYYC ,

In your formula, what's the [_last test] and [_New Pump Eff]] look like?

In addition, what's the actual expected result in your visual instead of 1,2,3.. ?

Could you please consider sharing more details about this issue for further discussion so that members in the community could help you better.

 

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors