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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
ShantanuBakare
New Member

Want Sum invoice amounts for which we received payment

have folloiwng data set

I want sum of Balance amount which got paid in Wk1, i.e. invoices which were in Wk1 and are not in Wk2.

 

Week NoBusiness Unitinvoice numberInvoice TypeBucket Balance Amount
Wk1BFS-UKINV001Overdue[0-30] 100
Wk1SWITZERLANDINV002Overdue[46-60] 100
Wk1BFS-UKINV003Overdue[31-45] 100
Wk1BFS-UKINV004Overdue[46-60] 100
Wk1BFS-NAINV005Overdue[0-30] 100
Wk1SWITZERLANDINV006Overdue[0-30] 100
Wk1SWITZERLANDINV007Overdue[46-60] 100
Wk1BFS-NAINV008Overdue[31-45] 100
Wk1SWITZERLANDINV009Overdue[0-30] 100
Wk1SWITZERLANDINV010Overdue[46-60] 100
Wk1SWITZERLANDINV011Overdue[31-45] 100
Wk1BFS-UKINV012Overdue[46-60] 100
Wk1BFS-NAINV013Overdue[0-30] 100
Wk1BFS-NAINV014Overdue[46-60] 100
Wk1BFS-NAINV015Overdue[46-60] 100
Wk2BFS-UKINV004Overdue[31-45] 100
Wk2SWITZERLANDINV005Overdue[0-30] 100
Wk2BFS-UKINV006Overdue[46-60] 100
Wk2BFS-UKINV007Overdue[31-45] 100
Wk2BFS-NAINV008Overdue[46-60] 100
Wk2SWITZERLANDINV009Overdue[0-30] 100
Wk2SWITZERLANDINV010Overdue[0-30] 100
Wk2BFS-NAINV011Overdue[46-60] 100
Wk2SWITZERLANDINV012Overdue[31-45] 100
Wk2SWITZERLANDINV013Overdue[46-60] 100
Wk2SWITZERLANDINV014Overdue[0-30] 100
Wk2BFS-UKINV015Overdue[0-30] 100
Wk2BFS-NAINV016Overdue[46-60] 100
Wk2BFS-NAINV017Overdue[46-60] 100
Wk2BFS-NAINV018Overdue[46-60] 100

 

I want sum of invoices which have got paid in Wk1 (Week1) for above (Dummy) data I should get sum of 'Balance Amount' for invoice number INV001, INV002 and INV003 as these invoices are not there in Wk2 (Week2) Also need sum of 'Balance Amount' for INV016, INV017 and INV018. Can someone help me build two separate DAX measures. I want to put this Sum in matrix, so that it can be devided in Bucket.

3 REPLIES 3
amitchandak
Super User
Super User

@ShantanuBakare , Create measures for Week 1 and week 2

example

Paid = countx(filter(values(Table[Invoice Number]) , not(isblank([Week1])) , isblank([Week2])),[Invoice Number])

 

where

Week1 = calculate(sum(Table[Bal Amount]), Filter(Table, Table[Week No] ="Wk1"))


Week2 = calculate(sum(Table[Bal Amount]), Filter(Table, Table[Week No] ="Wk2"))

 

 

if you have date and want to calculate WOW

Power BI — Week on Week and WTD
https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3
https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-La...
https://www.youtube.com/watch?v=pnAesWxYgJ8

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi Amit, Thanks for answering my quesiton. while entering 'Paid' I am getting following error. 

ShantanuBakare_1-1631615955884.png

Too many arguments were passed to FILTER funtion. The maximum argument count for the function is 2.

 

 

I want sum of 'Balance Amount' which are paid in Wk1. That is invoices which were present in Wk1 are not present in Wk2.

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.