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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
nemo
Helper I
Helper I

What is the correct parameter type for ALL?

I created this measure to test how context evaluation worked:

 

Last Non-blank =
LASTNONBLANK (
'Date'[Date],
CALCULATE ( COUNTROWS ( Sales ), ALL ( Product ) )
)
 
However, I got an error message saying that Product was not the correct parameter type (please see the screen shot).
Capture.PNG
 
Could someone please explain the meaning of that error message?
1 ACCEPTED SOLUTION

Hi @nemo ,

 

Keep Product in single quotes 'Product'.

It is giving an error because Product is one of the built in function in Power BI.

 

Please try it and let me know if that works for you.

 

Best regards,

Pooja Darbhe

View solution in original post

4 REPLIES 4
PoojaDarbhe
Resolver I
Resolver I

Hi @nemo ,

 

Please check whether you have relationship between Sales and Product tables, if that exist then only it will work, if not please create a relationship first then try.

 

Best regards,

Pooja Darbhe

Thanks @PoojaDarbhe for your quick response. The model did have a relationship between Product and Sales as shown below Capture.PNG

Hi @nemo ,

 

Keep Product in single quotes 'Product'.

It is giving an error because Product is one of the built in function in Power BI.

 

Please try it and let me know if that works for you.

 

Best regards,

Pooja Darbhe

Excellent. Thanks @PoojaDarbhe

Intellisense seemed not that inteligent: it should have simply spelt out that Product was a reserved keyword 😉

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors