Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
gauravnarchal
Post Prodigy
Post Prodigy

Need help with Calculated Column or Measure

Hello - I need your help in creating a measure or calculated column

 

  1. Show all invoice numbers and total Amounts in columns against each (Settlement) Auth. When there are multiple invoice numbers against the same AUTH is to to be separated with a slash “/”.

I have attached the sample data file. Click Here

 

Pic 1.png

 

5 REPLIES 5
v-chenwuz-msft
Community Support
Community Support

Hi @gauravnarchal 

 

The link to you pbix file has expired. So I create some data depend on your discripation.i put my pbix file in the end and you can reference.

Try this measure:

Measure =
CONCATENATEX( 'ARInvoices', [invoice number], "/" )

vchenwuzmsft_0-1634541004034.png

 

If you want to create a column the following formula will helpful.

 

Amount =
SUMX(
    FILTER( 'CashReceipt', [AUTH] = EARLIER( 'settlement'[AUTH] ) ),
    CashReceipt[Amount]
)
invoicenumber =
CONCATENATEX(
    FILTER( ARInvoices, ARInvoices[AUTH] = EARLIER( settlement[AUTH] ) ),
    [invoice number],
    "/"
)

vchenwuzmsft_1-1634541004035.png

 

Best Regards

Community Support Team _ chenwu zhu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-chenwuz-msft  - Thank you for looking into this and helping me. I have attached my PBIX file for you to look at the data.

 

Click Here

 

Thanks

Hi @v-chenwuz-msft  - I have tried your solution, but I am not able to get the desired results for Invoice numbers.

 

I have attached my data again for you to see. Click Here

 

Many thanks for your help in advance.

Hi @gauravnarchal .Your model has some problems if you want to do this ,you should edit them like the following make sure these tables can filter by Settlement tables AUTH field.

vchenwuzmsft_0-1634626734690.png

 

 

And this measure,but unselect the blank checkbox in the filter

vchenwuzmsft_1-1634626734693.png

Measure =
CONCATENATEX( 'ARInvoices', [invoice number], "/" )

 Pbix in the end.

 

Best Regards

Community Support Team _ chenwu zhu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

TomMartens
Super User
Super User

Hey @gauravnarchal

 

please consider remodeling your Power BI dataset. The concept of the model can be called Header/Detail style. The most recent article from the people of sqlbi.com is exactly mentioning this style/concept, and why it should be avoided: Header/Detail vs Star Schema models in Tabular and Power BI - SQLBI

Next to that, here you will find an introduction to data modeling in regards of Power BI data models: Model data in Power BI - Learn | Microsoft Docs

 

The many-to-many relationship will make the required measure (using the DAX function CONCATENATEX to create a string from the Invoice Numbers) expensive as you are traversing the relationships in the "wrong" direction.

 

Hopefully, this provides some new insights that will help to tackle your challenge.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors