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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
3cdoug
Regular Visitor

Cannot return multiple values

Expi_Names =
VAR CurrentDate = TODAY()
VAR OneYearAgo = EDATE(CurrentDate, -12)
 RETURN
    SELECTCOLUMNS(
        FILTER(ADDCOLUMNS(Roster,"Expired", DATEVALUE(Roster[Last Date])), [Expired Date] < OneYearAgo), "Last Name", Roster[Last Name], "First Name", Roster[First Name])

This is the syntax within DAX that I am using but I keep getting the error of multiple rows cannot be converted into a scalar value, any help on how to fix this?
3 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@3cdoug , SELECTCOLUMNS returns a table, so in case you are using it measure or column it will give an error for measure or column use sumx, maxx, minx etc to ensure one value per row

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

Ritaf1983
Super User
Super User

Hi @3cdoug 

Are you trying to create the measure?
Because this expression's result is table...and measure should be a scalar value...

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

Anonymous
Not applicable

Hi @3cdoug ,

 

I guess what you mean is you want to print multiple lines of results. You can try the IF function. It's 1 if it's in your rule or 0 if it's not. Finally, you can filter the result you want by setting this measure to 1 through Filter.

 

Hope it helps!

 

Best regards,
Community Support Team_ Scott Chang

 

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

3 REPLIES 3
Anonymous
Not applicable

Hi @3cdoug ,

 

I guess what you mean is you want to print multiple lines of results. You can try the IF function. It's 1 if it's in your rule or 0 if it's not. Finally, you can filter the result you want by setting this measure to 1 through Filter.

 

Hope it helps!

 

Best regards,
Community Support Team_ Scott Chang

 

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

Ritaf1983
Super User
Super User

Hi @3cdoug 

Are you trying to create the measure?
Because this expression's result is table...and measure should be a scalar value...

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile
amitchandak
Super User
Super User

@3cdoug , SELECTCOLUMNS returns a table, so in case you are using it measure or column it will give an error for measure or column use sumx, maxx, minx etc to ensure one value per row

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.