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
manuelfigueira
Helper II
Helper II

DAX Summarize column and FILTER combined.-

Hello Everyone,

 

I have the DAX below which is basically a filtering to find the all PHC characters among a list of items but I would like to know how to summarize the column Invoice [Invoice number] as there are duplicate invoices number and I just need unique PHC invoice numbers in one column plus the other extra columns? I can't fingure out how to combine summarize column function with filter function,

 

 

Many thanks!!

 

 

 

FILTER('FACT_SAP', 'FACT_SAP'[Invoice Amount] <> 0 && FIND("PHC",'FACT_SAP'[Invoice Number],,0) <>0)

 

 

1 ACCEPTED SOLUTION

Hi @manuelfigueira ,

 

The DAX which you have shared will output a new table. I think you are trying to do this as a new column therefore you are getting the error.

So, add a new table and then use this DAX expression:

Pragati11_0-1606305145647.png

 

Thanks,

Pragati

 

 

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

View solution in original post

4 REPLIES 4
manuelfigueira
Helper II
Helper II

Hello @Pragati11 

 

Thanks for the feedback! 

 

Yeah sure, this is my whole DAX but I have and error saying "The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value."

 

Any idea on this? 

 

Many thanks!

 

Bridge  Invoice Number = SUMMARIZECOLUMNS('FACT_SAP'[Invoice Number],"Unique Invoice Number", FILTER('FACT_SAP_FY1921', 'FACT_SAP_FY1921'[Invoice Amount as per SAP] <> 0 && FIND("PHC",'FACT_SAP_FY1921'[Invoice GR SAP],,0) <>0))

Hi @Pragati11 

 

You are awsome! thanks a lot for this, it worked out for me very well. My final DAX was this one and seems to run well

 

 

 

 

 

 

Bridge  Invoice Number = SUMMARIZECOLUMNS('FACT_SAP'[Invoice SAP], FILTER('FACT_SAP', 'FACT_SAP'[Invoice Amount SAP] <> 0 && FIND("PHC",'FACT_SAP'[Invoice SAP],,0) <>0), "Invoice SAP", SUM(FACT_SAP[Invoice Amount SAP]),"Dates",MIN('FACT_SAP'[Posting Date]))

 

 

Thanks a lot!! 

Hi @manuelfigueira ,

 

The DAX which you have shared will output a new table. I think you are trying to do this as a new column therefore you are getting the error.

So, add a new table and then use this DAX expression:

Pragati11_0-1606305145647.png

 

Thanks,

Pragati

 

 

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Pragati11
Super User
Super User

HI @manuelfigueira ,

 

Can you share your complete SUMMARISE dax function here please?

You will have to basically use the SUMMARISE function on your INVOICE NUMBER column so you get unique invoice numbers and then other extra columns with expressions. 

 

You can check the following link on Summarise function:

https://docs.microsoft.com/en-us/dax/summarize-function-dax

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

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.