cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

Allselected function

Hallo Everyone,

 

I want to have a measure that uses all selcect on two different tables to include their Slicer in the Report .

 

Could someone please  correct the measure bellow?

Event_Duration_MIN average per Event_Start_Date =
AVERAGEX((

ALLSELECTED('SL F_Events'[Event_Start_Date],'SL D_Plant'[Name])),[Sum event duration])
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Allselected function

Hi @TatyDo ,

 

All column arguments of the ALL/ALLNOBLANKROW/ALLSELECTED function must be from the same table.

Try to create a relationship between the two tables and use the relationship column as the parameter of the ALLSELECTED () function.

 

Best regards,
Lionel Chen

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

5 REPLIES 5
Highlighted
Super User IV
Super User IV

Re: Allselected function

Not sure if I understand exactly what you mean, but would this work? 

Event_Duration_MIN average per Event_Start_Date =
AVERAGEX(
FILTER(ALLSELECTED('SL F_Events'[Event_Start_Date]),ALLSELECTED('SL D_Plant'[Name])),[Sum event duration])
 
You will need to have the correct relationships defined for it to work, so if this doesn't help, please post details of your data model and relationships along with clarification of what you need. 

 


______________


Has this post solved your problem? Please mark it as a solution so that others can find it quickly and to let the community know your problem has been solved. 


If you found this post helpful, please give Kudos.


I work as a trainer and consultant for Microsoft 365, specialising in Power BI and Power Query. 


excelwithallison.com

Highlighted
Super User IX
Super User IX

Re: Allselected function

@TatyDo , refer if this can help

https://www.sqlbi.com/articles/the-definitive-guide-to-allselected/



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Highlighted
Helper III
Helper III

Re: Allselected function

Thank you for your reply. I have added your measure, but I am not getting any value, like below. 2020-05-18 16_11_43-Shiftlog_UpD_German - Power BI Desktop.jpg

 

The Plant name is in the dimention table and it has a direct relationship to the table with the date. 

 

SL D_Plant and SL F_Events have a relationship

Highlighted
Community Support
Community Support

Re: Allselected function

Hi @TatyDo ,

 

All column arguments of the ALL/ALLNOBLANKROW/ALLSELECTED function must be from the same table.

Try to create a relationship between the two tables and use the relationship column as the parameter of the ALLSELECTED () function.

 

Best regards,
Lionel Chen

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

Highlighted
Community Support
Community Support

Re: Allselected function

Hi @TatyDo ,

 

Has your problem been solved? If yes please consider Accept it as the solution to help the other members find it more quickly.

 

Best regards,
Lionel Chen

 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Upcoming Events

Experience what’s next for Power BI

See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors
Top Kudoed Authors