The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi,
I have to calculate the difference with previuous data avaiable, but I dont' have a fix delta time:
am | val | delta |
30/11/2022 | 5000 | 67% |
31/12/2021 | 3000 | 50% |
31/12/2020 | 2000 | 67% |
31/06/2020 | 1200 |
With a defined period (11 moth) no problem
DELTA = (SUM(table[val])-CALCULATE(SUM(table[val]),PARALLELPERIOD(table[am],-11,MONTH)))/CALCULATE(SUM(table[val]),PARALLELPERIOD(table[am],-11,MONTH))
But if the period is not fixed which is the solution?
Solved! Go to Solution.
@Ice_82 , refer if the new offset function can help
Offset Compare Categories, Time Intelligence MOM, QOQ, and YOY: https://youtu.be/5YMlkDNGr0U
For fun only, a showcase of powerful Excel worksheet formula,
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
Sorry I simplified the real aggregation, my data are grouped in this way:
am | liv1 | flag | val | delta | |
30/11/2022 | group1 | a | 1000 | 43% | |
b | 1500 | 114% | |||
group2 | a | 1000 | 11% | ||
b | 2000 | 67% | |||
31/12/2021 | group1 | a | 700 | 17% | |
b | 700 | 40% | |||
group2 | a | 900 | 13% | ||
b | 1200 | 20% | |||
30/11/2021 | group1 | a | 600 | ||
b | 500 | ||||
group2 | a | 800 | |||
b | 1000 |
In this situation, how can I modify your code?
Thanks
@Ice_82 , refer if the new offset function can help
Offset Compare Categories, Time Intelligence MOM, QOQ, and YOY: https://youtu.be/5YMlkDNGr0U
User | Count |
---|---|
25 | |
10 | |
8 | |
6 | |
6 |
User | Count |
---|---|
31 | |
12 | |
10 | |
10 | |
9 |