measures in calculated columns
5 TopicsHELP _ Including measure in calculated column
Hi guys, I have 3 table : * Sales table including invoice date * collection table including clearing invoice date, net due date, Collection Period as calculated column (clearing date-Net due date) * date table with a link between invoice date[sales Table] and clearing date [Collection Table] Objective : for each row in the sales table I want to include average collection period for previous year example : if in a row of sales table, invoice date is 31-12-2022, I want to get Average collection period for all invoices cleared from 31-12-2022 to 31-12-2021. Measure should be -> Average collection previous year = CALCULATE( AVERAGE('Collection'[Collection Period]) ,PREVIOUSYEAR ('Sales'[Date invoice])) base on this measure, how can I include the value in each raw (as calculuted column) in sales table ???? thanks you in advanceSolved1.3KViews0likes6CommentsHow to deduct cents from a rate column and the multiply that value for a total volume in Power BI?
Hi Group, I’m new to Power BI and I’m trying to replicate from Tableau the below formula into Power BI. Can anyone please tell me how to create a measure in Power BI for the below formula? Formula in Tableau: Table Name: Bpay_Biller Columns: DR Chg Rate Debit Account Volume (0.88 - [DR Chg Rate]) * [Debit Account Volume] Thanks for your help ☺️!Solved840Views0likes2CommentsForecasting predictions for current year
Hello everyone, Trying to predict sales for current year. Already made measure: prediction (sales/number of days from the beggining of the year*365) - current sales. I want to add this measure to my visuals, but the problem is, that calculations are made for all the older years, and i cant filter out only current year value (maybe it is realationship problem - invoice date -> auto calendar). Idea what i want to do is this: Thank you for help!467Views0likes1CommentHelp required to replace blank value with a measure
Hi, I am trying to replace blank values in the column "value" with the max value if country = US. It is working fine if i enter replacement value as integer. Columns in Table A: Key, Country, Value Columns in Table B: Key, Country, Sales Thanks in advance!1.4KViews0likes5CommentsUsing count of selected years to calculate average
Hi, I hope someone can help me out here 🙂 I have a graph which shows 2020 Revenue trend per month and another line which is 2017 - 2019 AVG, so you can see how much we differ from the trend and also what we can expect for the rest of the year based on history. Below that there is another one which shows the same but showing the yearly totals. I would like to 2017 - 2019 AVG line to dynamicly calculate based on the selection in the table below. So if you only click on 2019 then it basically compares 2019 to 2020, if you select 2018 + 2019 then it only devides thes SUM by 2 and not 3. For this I wrote a measure to count the selected years (and exclude 2020): Selected years count = IF(CONTAINS(FinancialData , FinancialData[Date].Year] , 2020)=TRUE, CALCULATE(DISTINCTCOUNT(FinancialData[Date].[Year]) , FinancialData[Date])-1, CALCULATE(DISTINCTCOUNT(FinancialData[Date].[Year]) , FinancialData[Date])) I checked and the calculation returns a number between 1 and 3, and it is a number. So I thought so far so good... Then I wanted to devide the sum of 2017 + 2018 + 2019 Revenue by the above. There is no syntax error but the calculation simply doesn't work 2017 - 2019 AVG Revenue = (FinancialData[2017 Revenue]+FinancialData[2018 Revenue]+FinancialData[2019 Revenue]) / [Selected years count] If I devide it simply by 3 it works perfectly but of course it is not dynamic and if you only select on or 2 years the calculation is off. Your support is much appreciated. Oliver757Views0likes2Comments