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

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.

Thanks In Advance.

 

Dax Formula What I used:

TBL_Date=DATESBETWEEN('Calender Table'[Date].[Date],MasterData[Invoice Date],MasterData[Payment Date])
var TBL_FinalDate=
ADDCOLUMNS(TBL_Date,"Working day",IF(WEEKDAY([Date],2)>=6,0,1),
"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))Capture1.JPGCapture2.JPG
3 REPLIES 3
v-eachen-msft
Community Support
Community Support

Hi @Anonymous ,

 

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

 

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.
Anonymous
Not applicable

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=
ADDCOLUMNS(TBL_Date,"Working day",IF(WEEKDAY([Date],2)>=6,0,1),
"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))
 
 
After Adding Index Column:
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=
ADDCOLUMNS(TBL_Date,"Working day",IF(WEEKDAY([Date],2)>=6,0,1),
"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....
 
Thanks In Advance.
Anonymous
Not applicable

Sorry There is NO CHANGE

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!

December 2024

A Year in Review - December 2024

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