null
4 Topicsneed help with a switch function with a null value
Always having problems with blank value. i am trying to do a switch function, if the date value is blank "--" if not, formula will do a datediff between 2 dates. testing = switch( TRUE, ISBLANK(Policy[Final Concurrence Date]),"--", NETWORKDAYS(Policy[Date_Assigned],Policy[Final Concurrence Date],1) ) formula is calculating the datediff correctly, but having a hard time if the date is blank/null. tried IF/else as well, both gave me this error expressions that yield variant data-type cannot be used to define calculated columns Those who are smarter than I please help. tySolved2.6KViews0likes4CommentsDAX when slicer is not selected then null
I have a direct query to my data set yet I need the follwoing: When there is no value selected in the slicer for example when there is no date selected or there is no customer number selected then my table should rest in null and only show values if the user selects a date and a customer number. ThanksSolved2KViews0likes1CommentEXACTLY what does BLANK() mean in DAX?
I was surprised to see the following expression in Greg Deckler's "Learn Power BI" book: % Utilization = VAR __utilization = DIVIDE([Total Billable Hours], [Total Hours], 0) RETURN __utilization + 0 And my question is about the implications of the last line. Assuming that the VAR expression is returning the same value as BLANK(), then BLANK() is obviously NOT returning a blank character, as adding zero to a character is not meaningful in many computer languages. But Microsoft DOCs only says that BLANK() returns "a blank", which is clearly not true. Apparently BLANK() is a kind of pseudo-NULL, but learning that I can add a number to "nothing" was a surprise. I would appreciate any links or deeper explanations of what's happening above, whether the expression result is equivalent to BLANK() or some other "kind of like NULL" concept. Thanks in advance.Solved1.4KViews0likes2CommentsCalculate average working days between two dates, from a calculated column
I'm currently using the following equation to calculate the total working days between two dates: Total Working Days Column = SUMX ( FILTER ( 'Calendar', 'Calendar'[Date] >= Tasks[Task Start Date] && 'Calendar'[Date] <= Tasks[Task End Date] ), 'Calendar'[isWorkDay] ) Where the table Calendar, is a table with all dates listed and a column of isWorkDay, to indicate if it is Mon-Fri and not Sat or Sun. This calculation is working for each row, except for the case when my Task End Date is an empty field. Instead of returning NULL for the Total Workday Days Column, I'm receiving a random high value like 5042 or something similar (when instead it should not be able to calculate it because there is only a start date and no end date). I would like to receive a NULL or empty value so that when I calculate an average on my Total Working Days Column, I get an accurate number that excludes my nulls. Is there a way to add that into my column calculation or do I need to use some other filtering method? Thank you for your help!Solved6.3KViews0likes4Comments