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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Hactogeek
Frequent Visitor

Calculated Column with filter on selected values

Hi everyone,

 

I need to update my calculated column values based on user selections in the report.

 

I tried a lot of DAX formula but no way to reach my goal.

 

My DAX formula :

 

 

Colonne = CALCULATE(
	COUNT(InLaneEvents[CardId]);
	FILTER(
        InLaneEvents;
        (INT(InLaneEvents[To]) <= AllDay[Date])
        && (INT(InLaneEvents[From]) >= AllDay[Date] || INT(InLaneEvents[From]) = BLANK())
        /*&& (SEARCH(InLaneEvents[Id];CONCATENATEX(VALUES(Lanes[Id]);Lanes[Id];",");;-1) <> -1)*/
        /*&& CONTAINS(VALUES(Lanes);Lanes[Id]; InLaneEvents[Id])*/
    );
    ALLSELECTED(InLaneEvents)  
)

 

The relationship between InLaneEvents[Id] and Lanes[Id] exists in both directions.

 

My slicer is on Lanes[Id] but I also tried to put it on InLanesEvents[Id] without success.

 

I am wondering now if it is possible.

 

Thank you for your help.

 

TonyM

 

1 REPLY 1
v-yuta-msft
Community Support
Community Support

Hi Hactogeek,

 

As a general suggestion, you may should try ALLSELECTED(InLaneEvents[Id]) Instead of ALLSELECTED(InLaneEvents) because there're some difference between them.  ALLSELECTED(InLaneEvents) will remove all the filters in table InLaneEvents while ALLSELECTED(InLaneEvents[Id]) only remove the column filter.  For details, please also refer to: https://www.sqlbi.com/articles/understanding-allselected/.

 

Regards,
Jimmy Tao

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 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.