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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.