Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hello,
I would like to ask how to fix this. I wanted to calculate the change between years but getting null value, Formula looks like this:
mokLY =
IF( HASONEVALUE(PARDAVIMAI[year]) ,CALCULATE ( [moketina_suma],
DATEADD (PARDAVIMAI[SUTP_DATA],-1,YEAR ) ) )
this formula generates null it is not depending on which year I select.
Hi @Analitika
Maybe try to do something like this:
SumLY = CALCULATE ([moketina_suma], SAMEPERIODLASTYEAR (PARDAVIMAI[SUTP_DATA]))
It is not what I am looking for. My point to get percent to see increase decrese comparing same period. So for this I used:
mokLY =
IF( HASONEVALUE(PARDAVIMAI[year]) ,CALCULATE ( [moketina_suma],
DATEADD (PARDAVIMAI[SUTP_DATA],-1,YEAR ) ) )
@Analitika
You can still use my measure.
Do something like this:
Diff to last year % = DIVIDE ( [moketina_suma], [SumLY],0)-1
This will show you the year over year percentage difference for the period you specify in a slicer.
So if you choose full 2021 year it will show you the difference to full 2020.
Getting this error:
In SAMEPERIODLASTYEAR function use the date column from your date table instead of PARDAVIMAI[SUTP_DATA].
Hi, it also wrong:
All time diff is -1. But sum is different in 2021 and 2022 years. I also checked that there is a relationship between date and table2 tables. But getting wrong answer.
@Analitika
Maybe try to post some sample data and expected result.
It would be easier to work on.
Expected result that I could percents how sales increased or decresed per period.
I use formula but it doesn't work.
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
87 | |
87 | |
83 | |
65 | |
49 |
User | Count |
---|---|
127 | |
108 | |
89 | |
70 | |
66 |