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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.