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

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

Reply
AlexD123
New Member

Help With Multiple IF Measure

Hi, 

 

I am looking to recreate an existing Crystal Report Formula in DAX as a measure. Please could someone advise. I will be using a YEARMONTH Slicer and a seprate dates table containing the usual year, month etc etc

 

if DatePart('yyyy',{urvPMContractAnalysisDD_WithPCOEstCost.Mth}) < DatePart('yyyy',{?ThroughMth}) then
if DatePart('yyyy',{urvPMContractAnalysisDD_WithPCOEstCost.ProjMth}) < DatePart('yyyy',{?ThroughMth}) then
{urvPMContractAnalysisDD_WithPCOEstCost.ProjCost}
else
{urvPMContractAnalysisDD_WithPCOEstCost.CurrEstCost}
else
0

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@AlexD123 , use correct column and table name

 

if ( year(urvPMContractAnalysisDD_WithPCOEstCost[Date]) < year([ThroughMth]) ,
if ( month(urvPMContractAnalysisDD_WithPCOEstCost[Date]) < month([ThroughMth]) ,
[rvPMContractAnalysisDD_WithPCOEstCost[ProjCost] , urvPMContractAnalysisDD_WithPCOEstCost[CurrEstCost]),0)

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

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @AlexD123 ,


Could you tell me if your problem has been solved?
If it is, kindly Accept it as the solution. More people will benefit from it.
Or you are still confused about it, please provide me with more details about your problem.


Best Regards,
Stephen Tao

amitchandak
Super User
Super User

@AlexD123 , use correct column and table name

 

if ( year(urvPMContractAnalysisDD_WithPCOEstCost[Date]) < year([ThroughMth]) ,
if ( month(urvPMContractAnalysisDD_WithPCOEstCost[Date]) < month([ThroughMth]) ,
[rvPMContractAnalysisDD_WithPCOEstCost[ProjCost] , urvPMContractAnalysisDD_WithPCOEstCost[CurrEstCost]),0)

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
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