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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Anonymous
Not applicable

Dynamic value in measure

Total =
var _nl ="
"
var _selected = CONCATENATEX(VALUES('Commitment Rundown'[Date]),FORMAT('Commitment Rundown'[Date],"dd-mmm-yy"),_nl)
return 
CALCULATE(DISTINCTCOUNT('Commitment Rundown'[LTP]),
    FILTER('Commitment Rundown',FIND(FORMAT([Baseline Finish WE],"dd-mmm-yy"),_selected,1,-2)<>-2 &&
                                FIND(FORMAT([RFSU Forecast WE],"dd-mmm-yy"),_selected,1,-2)<>-2))
 
Hi y'all. Here's the dax formula. And it doesn't work as it should be, because it doesn't get you the selected value inside the formula but only on exit, checked with visual.
Is there any way to do this?
I want to filter out the data so my other two dates [baseline finish] and [RFSU forecast] are in the range of selected date.
It's in same table so the option with the date table joined to main table won't work cause one relationship will be inactive, unless I miss something
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

Please try the following DAX formula and check if they can solve the problem:

Total = 
VAR _selectedDates = VALUES('Commitment Rundown'[Date])
RETURN
CALCULATE(
    DISTINCTCOUNT('Commitment Rundown'[LTP]),
    FILTER(
        'Commitment Rundown',
        'Commitment Rundown'[Baseline Finish WE] IN _selectedDates &&
        'Commitment Rundown'[RFSU Forecast WE] IN _selectedDates
    )
)

 

Best Regards,

Wisdom Wu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous ,

Please try the following DAX formula and check if they can solve the problem:

Total = 
VAR _selectedDates = VALUES('Commitment Rundown'[Date])
RETURN
CALCULATE(
    DISTINCTCOUNT('Commitment Rundown'[LTP]),
    FILTER(
        'Commitment Rundown',
        'Commitment Rundown'[Baseline Finish WE] IN _selectedDates &&
        'Commitment Rundown'[RFSU Forecast WE] IN _selectedDates
    )
)

 

Best Regards,

Wisdom Wu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

@Anonymous 
Thank you very much, it works! YAY!!!

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.