cancel
Showing results for
Did you mean:
Helper III

## Network Days with Negative Values In DAX Column

Dear All  ,

Plese help me to get out of this !!!

I want Values Row by row in Calculated column followed same way as you mentioned below and it is not giving me negtive values,Please find the Below Data whichi have and Screen Captures.

Dax Formula What I used:

TBL_Date=DATESBETWEEN('Calender Table'[Date].[Date],MasterData[Invoice Date],MasterData[Payment Date])
var TBL_FinalDate=
"Holiday",IFERROR(LOOKUPVALUE('Holiday-2019'[Holidaycount],'Holiday-2019'[Holidays - 2019,2020],[Date]),0)
)
return
SUMX(TBL_FinalDate,if([Working day]=1&&[Holiday]=0,1,0))
3 REPLIES 3
Highlighted
Community Support

## Re: Network Days with Negative Values In DAX Column

Hi @younis ,

Do you mean to get a continuous accumulation value instead of a total value?
You could add an index column in your table in the query editor.

Then add a condition in your SUMX formula like :

``FILTER('Table','Table'[Index]<=EARLIER('Table'[Index]))``

If this post helps, then please consider Accept it as the solution to help the other members find it.
Highlighted
Helper III

## Re: Network Days with Negative Values In DAX Column

Dear @v-eachen-msft ,

Current using Dax Formula:

Receipt Date to Posting Date(Working Days) =
var TBL_Date=DATESBETWEEN('Calender Table'[Date].[Date],MasterData[Invoice Received on],'MasterData'[Posted Date])
var TBL_FinalDate=
"Holiday",IFERROR(LOOKUPVALUE('Holiday-2019'[Holidaycount],'Holiday-2019'[Holidays - 2019,2020],[Date]),0)

)
return
SUMX(TBL_FinalDate,if([Working day]=1&&[Holiday]=0,1,0))

Invoice Date to Receipt Date(Calender Days ) =
var TBL_Date=DATESBETWEEN('Calender Table'[Date].[Date],MasterData[Invoice Date],'MasterData'[Invoice Received on])
var TBL_FinalDate=
"Holiday",IFERROR(LOOKUPVALUE('Holiday-2019'[Holidaycount],'Holiday-2019'[Holidays - 2019,2020],[Date]),0)
)
return
CALCULATE(SUMX(TBL_FinalDate,if([Working day]=1&&[Holiday]=0,1,0))-1,FILTER(MasterData,MasterData[Index]<=EARLIER(MasterData[Index])))

There is Change....

Highlighted
Helper III

## Re: Network Days with Negative Values In DAX Column

Sorry There is NO CHANGE

Announcements

#### Microsoft Ignite

This will be a conference that you do not want to miss!

#### Get Ready for Power BI Dev Camp

Don't miss the Power BI Dev Camp this week!

#### August Community Highlights

Check out a full recap of the month!

#### August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

#### Experience what’s next for Power BI

Join us for an in-depth look at the new Power BI features and capabilities at the free Microsoft Business Applications Launch Event.

Top Solution Authors
Top Kudoed Authors