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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
garythomannCoGC
Impactful Individual
Impactful Individual

DAX why the error when the focus has changed

sql programmer having 'fun' with dax :}    Current post while trying to get a query to work, dax syntax

Now different question, why the exact same query works for one return and not the other?

 

pml var return focus

garythomannCoGC_0-1692230937155.png

 

pml_id return focus

garythomannCoGC_1-1692231002189.png

 

Hilarious, now expand the query and new focus works!?   

garythomannCoGC_0-1692231941994.png

==================================================================

Why no data returned when  'Measure Benefit Master'[PM IDId] = 3921  in the dataset shows 4 rows?

Try with direct literal.

garythomannCoGC_0-1692232856212.png

dataset table mbm.PM IDId  filtered for 3921

garythomannCoGC_1-1692232918212.png

>>  answer is lack of data integrity in the data,   'Measure Benefit Master'[DIR] = "CO"   has different values, remove and working :}

==================================================================

 

1 ACCEPTED SOLUTION
OwenAuger
Super User
Super User

Just catching up with your question here 🙂

One key point: DAX queries can only return tables, not scalar values.

So RETURN pml will result in an error in the above queries.

 

Contrast with measures that must return scalar values.


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
LinkedIn

View solution in original post

1 REPLY 1
OwenAuger
Super User
Super User

Just catching up with your question here 🙂

One key point: DAX queries can only return tables, not scalar values.

So RETURN pml will result in an error in the above queries.

 

Contrast with measures that must return scalar values.


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
LinkedIn

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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