Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Specifically, can someone please help me with the formula to calculate the Case Age in Power BI?
Solved! Go to Solution.
Hi @amabrenda1986 ,
Please try below steps:
1. you need create a date table that record the holiday date, i create a holiday Table 2 for test
Table 2:
Table:
2. create a new column for Table with below dax formula
Column =
VAR _status = [StatusCode]
VAR _start = [CreatedOn]
VAR _end = [CompletedOn]
VAR tmp =
SELECTCOLUMNS ( 'Table 2', "Date", [Date] )
VAR _val =
SWITCH (
[StatusCode],
"Active", NETWORKDAYS ( _start, TODAY (), 1, tmp ),
"Resolved", NETWORKDAYS ( _start, _end, 1, tmp ),
"Cancelled", NETWORKDAYS ( _start, _end, 1, tmp )
)
RETURN
_val
Please refer the attached .pbix file.
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @amabrenda1986 ,
Please try below steps:
1. you need create a date table that record the holiday date, i create a holiday Table 2 for test
Table 2:
Table:
2. create a new column for Table with below dax formula
Column =
VAR _status = [StatusCode]
VAR _start = [CreatedOn]
VAR _end = [CompletedOn]
VAR tmp =
SELECTCOLUMNS ( 'Table 2', "Date", [Date] )
VAR _val =
SWITCH (
[StatusCode],
"Active", NETWORKDAYS ( _start, TODAY (), 1, tmp ),
"Resolved", NETWORKDAYS ( _start, _end, 1, tmp ),
"Cancelled", NETWORKDAYS ( _start, _end, 1, tmp )
)
RETURN
_val
Please refer the attached .pbix file.
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Please can someone tell me what is wrong with this query
I used this formular but how do i exclude holidays and Weekends please
See sample extract of my fact table
exctract from date table
@amabrenda1986 That just looks like a date table. What does your fact table look like? Normally these days you would use the NETWORKDAYS function.
I am expecting a formula that will
calculate the date difference between the created date and today, with the exclusion of holidays and weekends if the status = Active
Calculate the date difference between created date and completed date, with the exclusion of holidays and weekends if the status = Completed or cancelled
my fact table has a created on date and completed on date with the statuses.
hope this information is sufficient for you to give me an answer please
User | Count |
---|---|
78 | |
75 | |
62 | |
60 | |
46 |
User | Count |
---|---|
109 | |
95 | |
86 | |
79 | |
61 |