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
abhi8569
Frequent Visitor

Need help in defining a measure

Hello All,

 

I have a data model which looks something like this:

Billing same as invoice .png

 

 

 

 

 

 

 

 

 

 

 

 

 

My requirement is to count the number of Invoice Number that satisfies following logical expression:
InvoiceDate(InvoiceMonth) == BillingDate(Billing Month) && InvoiceDate(InvoiceYear) == BillingDate(Billing Year)

 

I am not sure if that's even possible given how data is modelled. Kindly help me out in writing a DAX measure.

 

The Billing Date table contains three billing dates corresponding to previous, current and Next Billing date for each customer. Invoice Detail table contains informatrion of all the invoices generated for the customers.

 

Thank you!

 

1 REPLY 1
RMDNA
Solution Sage
Solution Sage

Hi @abhi8569 - the way you've drawn it, is the relationship between Customer Detail and Billing Date going in the wrong direction? I would imagine BillingDate is a date table with unique dates, so the 1: should be on that side.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

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

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.