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
AnzAsh66
New Member

DAX & DATA MODELLING

  • 1000212363.jpg

    I need 1 help with respect to Power BI Data Modelling and DAX.
  • I have Creation_date column in PO_HEADERS_ALL Table and Completion_date column in PO_REQUISITION_HEADERS_ALL Table.
  • I need to create a measure which needs both these columns. Can you all please help how it can be done ?
  • Also I have Calculated Column PO CYCLE in PO_HEADERS_ALL and Calculated Column PR CYCLE in PO_REQUISITION_HEADERS_ALL. I want to show both of these in a Table which will show these 2 along with a third column AGENT_NAME from PO_AGENTS_V. Please assist.
2 REPLIES 2
lbendlin
Super User
Super User

Please add a Calendar table to your data model.

ahadkarimi
Solution Specialist
Solution Specialist

try two measures below, and if you encounter any issues, let me know.

 

Date Difference Measure = 
DATEDIFF(
    SELECTEDVALUE(PO_HEADERS_ALL[Creation_date]), 
    SELECTEDVALUE(PO_REQUISITION_HEADERS_ALL[Completion_date]), 
    DAY
)
Is Creation Before Completion = 
IF(
    SELECTEDVALUE(PO_HEADERS_ALL[Creation_date]) < SELECTEDVALUE(PO_REQUISITION_HEADERS_ALL[Completion_date]), 
    "Yes", 
    "No"
)

 

 

Did I answer your question?  If so, please mark my post as the solution!
Your Kudos are much appreciated!  Proud to be a Resolver III !

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.