if else
6 TopicsIF value exists on calendar date
Hi everyone, i need help creating a measure that evaluates whether a value in on table exists at a particular date within the calender table . I am working with Two tables, on main table that has a customer and a purchase date. The second table is just a table showing the daily calendar dates. the outcome wanted is to evaluate whether a purchase was made by a customer at a certain date on the daily calender. the tables are as shown below : RESULT If a customer has purchased something on the date equivalent to the calendar date, return true, else false. as shown below: If anyone could assist me with writing a measure that could produce this outcome that would be wonderful 🙂 all help and sugegestions are welcome: Thank youSolved2.4KViews0likes6CommentsNew Condition Column - Sum
Hello Friends I need some help here ! let's say I have 'Table1', and 'Tabel2'. the two tables have the same column [A] with the same content. How can I write the folloing in DAX? I want to add a new column [B] to 'Table1', which is the sum of 'Table2'[X] when the two columns [A] is equal on both tables? appreciate your help.Solved985Views0likes2CommentsiF ELSE statment with a calculation for a custom colum
Hello Im trying to figure out how to get a colum to if else. I have a colum for completetion date of course and one with the number of years until retraining and I am trying to calculate the expiry date based on If completion date = null then "course has not started" else Date.AddYears([Completion Date],[Sheet1.Retraining]) I can currently just add the retraining colum to the completetion date and this gives me a result of the rows that have a completion date. But then I have error for all the ones that have Null instead. Anyone have any suggestions to achieve this.Solved694Views0likes2CommentsIs this a bug or something? (Using IF, HASONEVALUE and BLANK functions)
I have a measure formula like this: IF(HASONEVALUE([column_name]) , SUM([other_column_name]) , BLANK() ), so it should give the sum of the other column when the current context is one row and give blank when the current context includes more than one row. Though, when I add this measure to a visual, it doesn't allow me to include this measure in values. If I change "BLANK()" for 0 or 1, it plots the measure values without any problem. Why could this happen?1.2KViews0likes2CommentsWeekly aggregations not picking up appropriate data when blending data form two sources.
I have two tables that have similar information. One is an automatically generated statistical table and the other is manually refreshed from the general ledger. Periodically we need to “true up” data with the general ledger data. I have written an if statement that mostly gets the job done. The issue is that the weekly aggregations do not pick up the statistical data in the if statement.770Views0likes1CommentCalculate 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