if then
5 TopicsDAX measure with multiple IFs
Hello, Please can you help me to write this DAX measure in Power BI? I have 5 columns with multiple combinations (A - E) and F column which summarize the columns A - E. I need to obtain the result from column "RESULT" and I don't know what formula should I use. Thank you for your support.Solved683Views0likes2CommentsIF statement returns 0%
Hi guys, My previous colleague wrote an Dax If statement to return a percentage of a number. Below you can see the dax statement The problem is that I don't understand this statement. Dax If statement: " ProductivityA = IF([InvoicingTargetInHours] - [NormWorkingHours] = 0, 0, IFERROR(([InvoicingTargetInHours] / [NormWorkingHours]), 0)) " The measure is calculating the percentage correct if the InvoicingTargetInHours and the NormWorkingHours are different, see picture below: But once the InvoicingTargetInHours and the NormWorkingHours are the same number, it return 0% when in fact it should return 100% as productivity, see picture below: Can someone help explain this statement to me and how I should fix this dax? Should I rewrite or not? Im clueless at this point. Thanks guys!Solved1.4KViews0likes2CommentsIF string equals A, or B, or C, then D
Hi all, I am pretty new to DAX, and I have been stuck on an IF statement since this morning. The problem is I have a list of countries as strings. I want to group them, using a new column, into continents. For instance: IF [country] = "Italy", "Europe". and this line works pretty well. The problem is I would like to specify also other nations. I don't want to create endless IF statements, you know. XD So I think I need something like that: IF [country] = "Italy", "Germany", "Spain", then "Europe" Thanks for any help you can give me. Also, if there are better solutions, my ears are open 😄 💙Solved11KViews0likes2CommentsIf Then Formula
How would you write a formula for a new column that only populates the value from the "YTD-2020M06-Installation Jobs" column if the value in the "Booked vs Actual" column is "Total Booking" AND the value in the "Sell Price/Earned Revenue & Gross Margin/Gross Profit" column is "Gross Margin/Gross Profit"?843Views0likes2CommentsI am trying to do an If/Then referencing another row
Expanded explanation-- In this data I want to do something like: if team on row a = team on row b and end of week on row a = end of week on row b - 7 then put the net change amount from row a into a field named 'running total' on row b I am trying to write the following: If the field PriorWeek in this row equals the EndDate in another row, put in the NetAmount from the other row as PriorAmount. ie: if the Net Amount for 5/1/20 is 50, put that as PriorAmount in the row for 5/8/20647Views0likes1Comment