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.
Hellooo PBI experts!
I have done the ETL process on a Balance Sheet for a group companies where the current month is compared to December of last year (i.e. Jan 2022 vs Dec 2021; Feb 2022 vs Dec 2021; etc.).
I need help with a function so that when February comes and the query is refreshed, December 2021 values from January table are removed and replaced with December 2021 values from February table.
Your help is much appreciated.
@Peter_Yaacoub , The flag you wanted is not clear.
You can get last year last month for selected value
last year last month = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1*month(Today()),MONTH)))
Last year last month based on today =
var _max= eomonth(today(),-1*month(Today()))
var Min= eomonth(_max,-1)+1
return
CALCULATE(sum('Table'[Qty]), FILTER(ALL('Table'),'Table'[Date] >= _min && 'Table'[Date] <=_max ) )
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 |
---|---|
104 | |
95 | |
80 | |
67 | |
62 |
User | Count |
---|---|
138 | |
107 | |
104 | |
82 | |
63 |