Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
The table I am working with is very simple, it literally has only the name of the office, and the sum of its orders in total.
I want to make some columsn that give me, the Net IO for the whole year until now, for the current month ,and for the current year. Are the functions YTD() available in power BI usable in the same way here? And if they do, how can I change the name of the column to show it's only for the specific period of time?
Thank you!
Assuming the current Date is the max. Date you can use these set analyses to create the values:
YTD: {<DateField={">=$(=YearStart(DateField))"}>}
PYTD: {<DateField={">=$(=YearStart(AddYears(DateField, -1))) <$(=YearStart(DateField))"}>}
MTD: {<DateField={">=$(=MonthStart(DateField))"}>}
Thank you for the response. Is it possible to put these formulas directly into the Load Editor script?
No. Set Analysis can only be used if charts.
If you want to calculate these measures in the script you would have to aggregate by the year/month and only keep the relevant results.
Thanks for the information.
I am trying to use the information you sent me, it seems like there is an issue.
If I understand correctly, I changed the DateField with the one I want, and the YearStart is a function, but it seems like this one won't work. It gives me this error:
Thanks for the patience