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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
NilR
Post Patron
Post Patron

SPLY with Multiple Date Columns

I have Service Date Column and Paid Date Column that might occures 3-6 month after the service date. So for instance I need to filter the dashboard 12 months of service and 15 months of Paid, How can I apply SPLY to the both [svc date] and [paid date] in a calculated measure [INVOICE] in a new measure!

 

VAR _SVC_MAX_DATE = MAX('SERVICE CALENDAR'[Date])
VAR _SVC_MIN_DATE= MIN('SERVICE CALENDAR'[Date])
VAR _PD_MAX_DATE = MAX('PAID CALENDAR'[Date])
VAR _PD_MIN_DATE= MIN('PAID CALENDAR'[Date])
RETURN
CALCULATE([INVOICE],SAMEPERIODLASTYEAR('INVOICE'[SVC_DT]),'INVOICE'[CLM_DT]>= _SVC_MIN_DATE && 'INVOCE'[SVC_DT] <= _CLM_MAX_DATE)

 

Thanks!

 

2 REPLIES 2
DataNinja777
Super User
Super User

Hi @NilR 

 

It seems to me that you don't need to have two calendar tables in your data model.  You can just have one calendar table and create inactive relationship between your calendar table and either of the Service Date Column or Paid Date Column, and then userelationship dax function to activate the inactive relationship.  

Best regards,

 

Thank you very new to stuff you just said 🙂 is there any article or something similar that I can read about ? or giving me an example?

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

Top Kudoed Authors