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
nandvroe
Frequent Visitor

Help totaling measure correctly

I am very inexperienced with Dax and am needing help with a measure.  The measure works correctly by row, but does not total correctly.  I understand why it doesn't total correctly, but haven't been able to modify it to total correctly.  Any help would be greatly appreciated.  I have attempted this in a calculated column, but get the wrong answer.  I believe the reason is that one "ProdNumber" can have several lines all started and ended on the same day, however each line is counted as a day and then it sums as several days instead of just one day. Below is my Dax Measure.

               

         DaysToComplete = CALCULATE(Sum(FiscalDate[IsWorkday]),
                  DATESBETWEEN((FiscalDate[Date]),
                  Minx(ForecastTbl,ForecastTbl[StartedDate]),
                  Minx(ForecastTbl,ForecastTbl[EndDate])
           ))
 
Thank you for your help.

 

 

3 REPLIES 3
Anonymous
Not applicable

We need to see:

 

1. The model.

2. Some sample data.

3. Some correct results.

 

You can do it all by pasting pics in here and descriptions in plain English. Always remember that it's you who knows the data and what you want to achieve. We don't.

 

Best

Darek

Thank you for your response.
I was actually able to get my calculated column working as expected so I will not need the measure.  

Anonymous
Not applicable

Good.

 

Best

Darek

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.

Top Solution Authors