Harsh
December 1, 2021, 2:41am
2
Hello @gkavesh ,
Thank You for posting your query onto the Forum.
The reason why you’re getting this kind of an error is because you’re simply referencing the naked column/field from the table while creating a measure. Had you been creating a calculated column it would’ve worked but in the case of measure, it needs to be wrapped with the function and in this case it’ll “SELECTEDVALUE() ” function.
So based on the condition that you’ve specified below is the measure alongwith the screenshot of the final results provided for the reference -
Days Difference =
DATEDIFF(
SELECTEDVALUE( InsData[Date of Service] ) ,
TODAY() ,
DAY )
I’m also attaching the working of the PBIX file for the reference purposes alongwith the links of the thread which covers similar types of solutions.
Hoping you find this useful and meets your requirements that you’ve been looking for.
Thanks and Warm Regards,
Harsh
DaysBetween - Harsh.pbix (167.7 KB)
Hello @bsteinacher ,
Thank You for posting your query onto the Forum.
Well you can simply use the “DATEDIFF” function to calculate the Time Scheduled. Below is the screenshot provided for the reference -
[Time Scheduled - 1]
[Time Scheduled - 2]
I’m also attaching the Excel as well as PBIX file of my working for the reference.
Hoping you find this useful and helps you in your analysis.
Thanks and Warm Regards,
Harsh
Time Scheduled.xlsx (9.0 KB)
Time Scheduled.pb…
Hello @ray ,
Thank You for posting your query onto the Forum.
As @marcster_uk suggested, you can try this by using the DATEDIFF function. Few days back similar type of query was posted by one of our member onto the forum. And below is the link provided for the reference about how the solution was achieved by using the DATEDIFF function.
[Time Scheduled - 2]
I’m also providing the working of the Excel as well as the PBIX file for the reference.
Hoping you find this useful and meets your requi…
Hello @cms418 ,
Thank You for posting your query onto the Forum.
Create a calculated column in your table with the below provided formula -
Real Work Days - Harsh =
CALCULATE( COUNTROWS( 'Date Table' ) ,
DATESBETWEEN(
'Date Table'[Date] ,
'Plannning and Progress Tracker'[Actual Mobilization Start Date] ,
'Plannning and Progress Tracker'[Actual Demobilization End Date] ) ,
'Date Table'[DayOfWeekName] <> "Sunday" ,
ALLSELECTED( 'Plannning and Progress Tra…
Hello @cms418 ,
With regards to your first query, you need to enter the context into the measure as per your business specific requirements i.e. whether you want to consider blanks end dates into the calculation or not. If so, what will be the condition? Blank end dates will be considered as Today? Or Blank end dates will be taken as start date itself? Or if it’s blank then ignore by putting the condition as 0? "I leave that aspect upto you about how you want to approach."
In my current measure…
Hello @JDopson ,
Thank You for posting your query onto the Forum.
Just few days back I encountered this very similar type of problem onto the Forum. The only difference being is, in your current query you also have the “Time” aspect whereas the previous one was only limited to the “Date” aspect.
So now, since you’ve a comination of “Date and Time” within your columns in the table. The first thing is, to separate them i.e. have individual columns for date as well as for time so that time-intell…
Hello @JoseMilhazes ,
So to achieve the results as per the third condition that you’ve specified wherein your customers don’t want to pay for an entire day but want to pay proportionally. Below is the new measure alongwith the screenshot of the final results provided for the reference -
Hire Days - 2 =
IF( ISINSCOPE( 'Hire Log - Data'[Pick Date] ) ,
IF( ISBLANK( SELECTEDVALUE( 'Hire Log - Data'[Delivery Date] ) ) ,
FIXED( ( TODAY() + TIME( 23 , 59 , 59 ) ) -
( SELE…