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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
TatyDo
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
v-lionel-msft
Community Support
Community Support

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
v-lionel-msft
Community Support
Community Support

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.

amitchandak
Super User
Super User
AllisonKennedy
Super User
Super User

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. 

Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as 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 C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

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

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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