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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

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

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

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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