Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello,
I'm working with a data extracted from here : "http://www.sii.cl/valores_y_fechas/uf/uf2018.htm". It shows the value of UF through time and I successfully transformed it to just two columns so I can call it correctly to another base when i have to transform $ to UF just by dividing $/value UF. The thing is my boss told me that for months that have passed i only need to use the UF value of the last day of the month and in the current month that now is November I have to use the value of UF of each day ( until it finishes and its the same as the others, use just the value of the end of the month).
This is the transformed data that only has 2 columns. The value of UF in Pesos $, and the date next to it by days.
I was think a condition that maybe sets "if its January , equals to value UF o last day of month january" and create a new column with the condition.
Like this.
Thank you in Advance.
hi, @Mafia7759
After my test, you could try these steps as below:
Step1:
Add a Year Month Number column for date
Year Month Number = YEAR(Table1[Date])*100+MONTH(Table1[Date])
Step2:
Add a result column
get last day each month = var _lastday=CALCULATE(MAX(Table1[Date]),FILTER(Table1,Table1[Year Month Number]=EARLIER(Table1[Year Month Number]))) return CALCULATE(SUM(Table1[Value]),FILTER(Table1,Table1[Date]=_lastday))
Best Regards,
Lin
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
96 | |
77 | |
66 | |
53 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |