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
admin11
Memorable Member
Memorable Member

How to Flag CUST_ID from SALES table ?

Hi All

 

I am able to flag Customer/Vendor Code from AR Table , using below measure :-

_FLAG TOP_AR = IF ( ( AR[Customer/Vendor Code] IN { "A10002" } ), 1, 0)
 
Why i am not able to Flag from SALES Table ?
_FLAG TOP_SALES = IF ( ( SALES[CUST_ID] IN { "A10002" } ), 1, 0)
 
i Get below error msg :-
A single value for column 'CUST_ID' in table 'SALES' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result.
 
Remark :- 
My Sales Table have field name = CUST_ID
CUST_ID field is Text format
 
 
 
 
 
Paul Yeo
 
1 ACCEPTED SOLUTION
PhilipTreacy
Super User
Super User

@admin11 

Hi Paul,

 

Download PBIX

 

That error is generated when you are trying to create a Measure and haven't provided an aggregation (like MAX) for the column.  Or you tried to create the column in the wrong table.

If you create the column in the Sales table then it works.  Is this what you want?

 

_FLAG TOP_SALES = IF ( ( SALES[CUST_ID] IN { "A10002" } ), 1, 0)

 

flag-.png

Regards

Phil

 

 



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


View solution in original post

2 REPLIES 2
PhilipTreacy
Super User
Super User

@admin11 

Hi Paul,

 

Download PBIX

 

That error is generated when you are trying to create a Measure and haven't provided an aggregation (like MAX) for the column.  Or you tried to create the column in the wrong table.

If you create the column in the Sales table then it works.  Is this what you want?

 

_FLAG TOP_SALES = IF ( ( SALES[CUST_ID] IN { "A10002" } ), 1, 0)

 

flag-.png

Regards

Phil

 

 



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


@PhilipTreacy 

i learn one more new thing , the field i want to create need to create at SALES table . 

Paul

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