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.

MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

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.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.