Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hello all,
I am new to PowerBI and I hope you can help me with this issue. I am trying to calculate a YTD average of the YTD. for further clarification I have this table:
Date | Owned Space (sqm) |
January | 1000 |
February | -100 |
March | 20 |
April | 0 |
May | -40 |
June | 32 |
July | 108 |
August | -2 |
we usually start with the current owned space in January and register the chage in the following months. Therefore, the best way to measure our current owned space is YTD, wich I obtain with a dax measure:
YTD sqm= TOTALYTD('Table 1'[Owned Space (sqm)],'Table1'[Date])
I then get the following table:
Date | Owned Space (sqm) | YTD sqm |
January | 1000 | 1000 |
February | -100 | 900 |
March | 20 | 920 |
April | 0 | 920 |
May | -40 | 880 |
June | 32 | 912 |
July | 108 | 1020 |
August | -2 | 1018 |
Now, what I want to calculate is the YTD average of YTD sqm. Which month by month would be something like
YTD average sqm March= (YTD sqm January+ YTD sqm February + YTD sqm March)/3
and the same for each month
Date | Owned surface (sqm) | YTD sqm | YTD average sqm |
January | 1000 | 1000 | 1000.0 |
February | -100 | 900 | 950.0 |
March | 20 | 920 | 940.0 |
April | 0 | 920 | 935.0 |
May | -40 | 880 | 924.0 |
June | 32 | 912 | 922.0 |
July | 108 | 1020 | 936.0 |
August | -2 | 1018 | 946.3 |
Wich measure can I use to achieve this (last column)?
Thank you in advance! 😊
Hello @paojira
Check the below calculation
Average YTD =
TOTALYTD ( SUM ( 'Month YTD'[YTD sqm] ), 'Month YTD'[Date] )
Note you must have a proper date column.
Hi Tarun, thank you for your reply, I tried to use the formula you mentioned. I just used SUMX instead of SUM, otherwise it won't accept me introducing a DAX measure:
Average YTD= TOTALYTD (SUMX('Table 1', [YTD sqm]), 'Table1'[Date])
The result however is now what I'm looking for, this just gives me the same numbers as I was getting with my YTD sqm measure. What I want to get is the YTD of the YTD basically.
Best regards,
Paola
Hello @paojira
Mine above formula should work but for that, you need the proper date in the YTD measure.
Do you have a date column values like "2020/12/12"?
User | Count |
---|---|
52 | |
51 | |
20 | |
17 | |
16 |
User | Count |
---|---|
113 | |
45 | |
44 | |
28 | |
22 |