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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

IF in calculated column

Hi , 

Please I need your help , 
I have 2 tables : 

- Cashflows

Fund

EntryDate 

Commitment

 

- ReportingDate

Reportingdate
reportingdate Q-1

 

these two tables are not linked in my model .

I want to get im matrix this 

fundentrydateNewcolumn

New column is based on the value selected in my slicer (slicer contains reporting date ) 
And I want to get True Or False in Newcolumn if Entrydate is between ReportingDate and ReportingdateQ-1.

I was test many measure but it don't work:

NewCommitment =
var rd = SELECTEDVALUE(ReportingDate[ReportingDate])
var rdM1 = PREVIOUSQUARTER(ReportingDate[ReportingDate])
var entrydate= MAX(CashFlows[EntryDate])

return IF( entrydate < rd && entrydate > rdM1 ,"True","False")

Thanks 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

NewEntryDate =
VAR _CurrentMonth = SELECTEDVALUE(ReportingDate[ReportingDate])
RETURN
CALCULATE(
MAX(CashFlows[EntryDate]),
DATESINPERIOD(
CashFlows[EntryDate],
_CurrentMonth,
-1,
QUARTER
)
)

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

NewEntryDate =
VAR _CurrentMonth = SELECTEDVALUE(ReportingDate[ReportingDate])
RETURN
CALCULATE(
MAX(CashFlows[EntryDate]),
DATESINPERIOD(
CashFlows[EntryDate],
_CurrentMonth,
-1,
QUARTER
)
)
Anonymous
Not applicable

NewCommitment = VAR rd = SELECTEDVALUE(ReportingDate[ReportingDate]) VAR rdM1 = PREVIOUSQUARTER(ReportingDate[ReportingDate]) VAR filteredDates = FILTER(ReportingDate, ReportingDate[ReportingDate] = rd || ReportingDate[ReportingDate] = rdM1) RETURN SWITCH(TRUE(), AND(MIN(filteredDates[ReportingDate]) <= MAX(CashFlows[EntryDate]), MAX(CashFlows[EntryDate]) <= MAX(filteredDates[ReportingDate])), "True", "False" )

 

Please try this measure 🙂 

Anonymous
Not applicable

Hi 

Thanks for your answer . But i have the below error : 

ndris_0-1674651767657.png

Kinds

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.