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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Need help Dax query

Hi All,

 

I have a logic like below,

⦁ Pull all the invoices for Agency Bill policies that are hitting the GL (based on later of effective or entry date) during the report run period, e.g.
⦁ If an invoice is created in January 2021 but with an effective date of March 2021, then it should appear in the report for the month of March 2021.
⦁ If an invoice is created in February but with an effective date backdated to January 2021, then it should appear in the report for the month of February.

 

please help me how to create a dax function on the above logic.

 

Thanks in advance.

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , You need measure like

 


calculate(count(Table[Invoice]), filter(Table, Table[Type] = "Agency Bill" && eomonth([effective date], 0) = eomonth([report run period], 0)))

 

calculate(count(Table[Invoice]), filter(Table, eomonth(Table[invoice Date],2) = eomonth(Table[effective Date],0)))

 

calculate(count(Table[Invoice]), filter(Table, eomonth(Table[invoice Date],-1) = eomonth(Table[effective Date],0)))

 

 

The second and third is made generic using month gap

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

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors
Top Kudoed Authors