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
BishwaR
Helper V
Helper V

Dax to show just a column

Hypothetically speaking I have a table with 3 columns Product ID, Product Name and Price.

I have to write a dax just to get the Product ID.

 

I wrote a Dax Product_ID= FILTER(Table_Name,Product ID <> BLANK( )) then it returns an error message saying "The expression refers to multiple columns. Multiple columns cannot be converted into a scalar value"

 

Thanks

 

Bishwa

2 REPLIES 2
v-jingzhang
Community Support
Community Support

Hi @BishwaR 

 

The expected result is not very clear. You want all the non-blank values from this column into a new table, or want an aggregate value (max, min, count...) of this column?

 

If you want all non-blank unique values from this column, you can add a new table 

Table 2 = SUMMARIZE(FILTER('Table (2)',[Product ID]<>BLANK()),[Product ID])

 

If you want to keep the duplicate IDs, you can add a new table

Table 2 = SELECTCOLUMNS(FILTER('Table (2)',[Product ID]<>BLANK()),"Product ID",[Product ID])

 

If these are not what you want, can you share some dummy data and expected result to make it clearer?

 

Regards,
Community Support Team _ Jing
If this post helps, please Accept it as the solution to help other members find it.

Greg_Deckler
Super User
Super User

@BishwaR Dax Product ID = MAX('Table_Name'[Product ID])


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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
Top Kudoed Authors