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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Help With IF and SUM

Hi,

 

I am trying to recreate the following calculation into a DAX Measure. Please can someone advice how ths is possible:-

 

    if  {Job_Mth}<={Current Month (Year Month YYYY-MMM Selection from Slicer} then

         SUM{Job Projected Pounds}

    else

        SUM{Job Contract Amount}

 

Thanks in advance

2 REPLIES 2
v-stephen-msft
Community Support
Community Support

Hi @Anonymous ,

 

You could try to use DATEVALUE function converts a date in "YYYY-MMM" format to a date in datetime format. Your formula can be recreated into a measure.

vstephenmsft_0-1649149134076.png

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

moizsherwani
Continued Contributor
Continued Contributor

@Anonymous it is not at all clear what your data model looks like so it is not possible to give an answer. Please share a picture of the model and the fields.

Thanks,

Moiz
Was I able to answer your question? Mark my post as a solution to help others. Kudos if you liked the solution.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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