Forum Discussion
Multiple columns cannot be converted to a scalar value|tried both measure and calculated column
I am trying to retrieve specific KPI status % on donut(Pass,fail,pending) using month slicer on visual but getting the error "The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value."
I tried it with both measure and calculated column. Although i doubt on using calculated column becoz im not doing any calculations in table columns , it is retrieval of text status .
any help will be appriciated
7 Replies
- amitchandak
Super User
Anonymous , When you created a column or measure you expected to return a column of measure
This is returning Table. Filter return Table
FILTER('07142020','07142020'[KPI Status])
- AnonymousNot applicable
Hi amitchandak
thanks for quick response, FILTER('07142020','07142020'[KPI Status]) , here KPI [status] is column of table 07142020
can you suggest what should i ammend to get expected outcome.
- amitchandak
Super User
Anonymous , then it should be like
KPI Status Name =
VAR ThisMonthKPIStatusName =
SWITCH (
SELECTEDVALUE ( 'Date Table'[MonthName]),
"July", '07142020'[KPI Status],
"August", '08042020'[KPI Status]
)Not this can not be column because you use selected value so return measure
KPI Status Name =
VAR ThisMonthKPIStatusName =
SWITCH (
SELECTEDVALUE ( 'Date Table'[MonthName]),
"July", Max('07142020'[KPI Status]),
"August", max('08042020'[KPI Status])
)return ThisMonthKPIStatusName
- Icey
Community Support
Hi Anonymous ,
Please refer to this blog to provide sample data for test: How to provide sample data in the Power BI Forum.
Best Regards,
Icey