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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
SkorpionAAM
Helper V
Helper V

Multiple arguments are not allowed in the ALLSELECTED function when the first argument is a table re

I M GEETING ERROR in this formula "Multiple arguments are not allowed in the ALLSELECTED function when the first argument is a table reference." any one tell me where im wrong 

SUMx('Calculation',[Requeird pop*0.45]) * ALLSELECTED('Operation Cost','Operation Cost'[Operation Cost])
2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@SkorpionAAM , Try like

SUMx('Calculation',[Requeird pop*0.45]) * ALLSELECTED('Operation Cost'[Operation Cost])

 

refer: https://docs.microsoft.com/en-us/dax/allselected-function-dax

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

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

Anonymous
Not applicable

Hi,@SkorpionAAM 

 

The syntax of ALLSELECTED is incorrect.

The ALLSELECTED function returns the context of the query without any column and row filters.

If there is one argument, the argument is either tableName or columnName.

If there is more than one argument, they must be columns from the same table.

 

But ALLSELECTED  maybe is not the best way to solve it, you can try like this to meet your needs,

 

Measure =SUMX ( 'Calculation', [Requeird pop*0.45] ) * SELECTEDVALUE ( 'Operation Cost'[Operation Cost] )

 

Or

 

Measure =SUMX ( 'Calculation', [Requeird pop*0.45] ) * MAXX( 'Operation Cost'[Operation Cost] )

 

 

If you want to learn more about it ,you can refer to : https://docs.microsoft.com/en-us/dax/allselected-function-dax

 

Hope it helps.

 

Best Regards,

Caitlyn Yan

 

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,@SkorpionAAM 

 

The syntax of ALLSELECTED is incorrect.

The ALLSELECTED function returns the context of the query without any column and row filters.

If there is one argument, the argument is either tableName or columnName.

If there is more than one argument, they must be columns from the same table.

 

But ALLSELECTED  maybe is not the best way to solve it, you can try like this to meet your needs,

 

Measure =SUMX ( 'Calculation', [Requeird pop*0.45] ) * SELECTEDVALUE ( 'Operation Cost'[Operation Cost] )

 

Or

 

Measure =SUMX ( 'Calculation', [Requeird pop*0.45] ) * MAXX( 'Operation Cost'[Operation Cost] )

 

 

If you want to learn more about it ,you can refer to : https://docs.microsoft.com/en-us/dax/allselected-function-dax

 

Hope it helps.

 

Best Regards,

Caitlyn Yan

 

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

@SkorpionAAM , Try like

SUMx('Calculation',[Requeird pop*0.45]) * ALLSELECTED('Operation Cost'[Operation Cost])

 

refer: https://docs.microsoft.com/en-us/dax/allselected-function-dax

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

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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