Forum Discussion
Filter and pull a single field
Hello all,
I'm starting with using powerbi, I got a question, I'm with an excel table, with 700 rows and 23 columns.
I need to create a dashboard for each product in this spreadsheet.
When creating a new calculation as follows:
FILTER ( RptAnalysisProduction, RptAnalysisProduction[Cell] = "Rental"
Me returns the error:
The expression references multiple columns. You cannot convert multiple columns to a scalar value.
what would be the way I can pull from my table some specific rows, without using the table view and select the field I want to see
thank you to anyone who can help me
- Anonymous2 years ago
Hi arthur_gand ,
The error you are getting means that your calculation is trying to return multiple columns instead of a single value. This is not allowed for a measure or a calculated column. You need to specify what value you want to return from the filtered table. For example, if you want to return the sum of the production column for the rental cell, you can use this formula:
Measure = CALCULATE ( SUM ( RptAnalysisProduction[Production] ), RptAnalysisProduction[Cell] = "Rental" )You can also use the visual filter option in Power BI to filter your table by the cell column and select only the rental value. This will apply the filter to all the visuals in your report page that use the same table.
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ RongtieIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
4 Replies
- IdrissshatilaSuper User
Hello arthur_gand ,
You filter the table in Power query to show only the data related to the product you want.
check this out https://learn.microsoft.com/en-us/power-query/filter-values
If I answered your question, please mark my post as solution, Appreciate your Kudos 👍
Follow me on Linkedin
Vote for my Community Mobile App Idea 💡- arthur_gandFrequent Visitor
I will use a different product for each dashboard, how do I do it? create a table for each dashboard?
- AnonymousNot applicable
Hi arthur_gand ,
The error you are getting means that your calculation is trying to return multiple columns instead of a single value. This is not allowed for a measure or a calculated column. You need to specify what value you want to return from the filtered table. For example, if you want to return the sum of the production column for the rental cell, you can use this formula:
Measure = CALCULATE ( SUM ( RptAnalysisProduction[Production] ), RptAnalysisProduction[Cell] = "Rental" )You can also use the visual filter option in Power BI to filter your table by the cell column and select only the rental value. This will apply the filter to all the visuals in your report page that use the same table.
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ RongtieIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- arthur_gandFrequent Visitor
In my case the columns are strings and not numbers, is there any other way?