User Profile
venetsa
Frequent Visitor
Joined 4 years ago
User Widgets
Contributions
Re: Dynamic measure for dividing revenues of a week value against its previous week
Hi Anonymous , I've tried your formula and it looks like the syntax is not correct with brackets at the end of the var_previous line previous week Fatturato = var _week = mid(SELECTEDVALUE('Data Ordine'[Settimana Ordine (Date)]),1,2) var _year = mid(selectedvalue('Data Ordine'[Settimana Ordine (Date)]),10,4) var _previous = calculate(Ordinato[Importo Cliente PC],filter(all('Data Ordine'),mid('Data Ordine'[Settimana Ordine (Date)],1,2)=_week-01))&&mid(SELECTEDVALUE('Data Ordine'[Settimana Ordine (Date)]),10,4)= var _year)) var _currentweek = calculate(Ordinato[Importo Cliente PC],filter(all('Data Ordine'),mid('Data Ordine'[Settimana Ordine (Date)],1,2))) = _week&&mid('Data Ordine'[Settimana Ordine (Date)],10,4)= var _year)) RETURN IF(_week=01, _currentweek, _previous) I tried correcting as suggested by PowerBi but still get an error1.3KViews0likes1CommentDynamic measure for dividing revenues of a week value against its previous week
Hi everyone, I need to calculate the percentage change of the "Fatturato" column from a week against its previous week (i.g. If today's current week is 01 so I will need % change of week 01 against 53, then week 53 against 52 and so on). Next week is 02 so I will need to display the percentage change of week 02 against 01 and so on. I have a table which shows the last 4 weeks values. The table has three columns: 1) the first column is a string representing weeks 2) the second column has revenues 3) the third column is a text string which defines the current week as "Ultima settimana chiusa", the previous week as "Settimana chiusa -1" and so on until the 4th week. The column "O_Flag Ultime settimane" changes as the weeks goes on: if we were in week 53 its corresponding value in column "O_Flag Ultime settimane" would be "Ultima settimana chiusa" . I cannot add colums to the tables. here a screenshot of the table: Can you help me? Thank You1.6KViews0likes9CommentsRe: Dynamic measure for dividing revenues of a week value against its previous week
Hi Greg_Deckler , I have tried your formula but I have some errors. Prova % prev week = VAR current2= [Fatturato B2C] VAR previous_Date = MAXX(FILTER('Data Ordine', 'Data Ordine'[Settimana Ordine]<EARLIER('Data Ordine'[Settimana Ordine])),'Data Ordine'[Settimana Ordine]) VAR previous = MAXX(FILTER('Data Ordine', 'Data Ordine'[Settimana Ordine]= previous_Date), [Fatturato B2C]) RETURN current2-previous Translating: EARLIEST refers to an earlier row context that doesn't exist. Also does this formula works even if the column it is using as reference is the first column? I also tested by using the MID function to extract only the latest date for that string. Thanks1.4KViews0likes0Comments
Data Privacy
Microsoft Fabric Community and Privacy
To learn more about how we manage your data, please review the Microsoft Fabric Community Data Privacy guide.