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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

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
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.