cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
nemo
Regular Visitor

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

View solution in original post

Excellent. Thanks @PoojaDarbhe

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

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.