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
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Get Ready for Power BI Dev Camp

Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

Get Ready for Power BI Dev Camp

Power BI Dev Camp - September 30th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.