Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
is there any way to do ytd for weeks as well
like
year
month
week
day
like this for column chart its not working for weeks for me otherwise its working well please help me out
Or is there any option i can use hierarchy instead of date in calculation
or how can i get correct calculation in weeks as well on same measure
Solved! Go to Solution.
Works for me - you just need to use the separate computation with the -364. All others can use SAMEPERIODLASTYEAR.
td is not working for weeks thats why growth is not working for weeks
weeks are incompatible with months. You need to be very specific how you want to portion that.
Is there anything i can do to get it for weeks as well like using sameperiod last year or something because i need to get it for weeks as well in my report
Hi @SumitDubey ,
Maybe you can add a new column in your table using this DAX:
WEEK = WEEKNUM('Table'[Date])
The output is as below:
This will return the number of weeks each date corresponds to in the current year.
WEEKNUM function (DAX) - DAX | Microsoft Learn
Also, in DAX calculations, the date structure hierarchy does not include the week as a level, and you need to use the week number alone instead of the hierarchy.
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
subtract 364 from the date for an approximation of "same week last year"
I tried it was not working
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information or anything not related to the issue or question.
If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...
Date | Country | Pen | Desk |
2021-10-11 15:41:05 | Australia | 30 | 28 |
2023-04-20 00:09:44 | USA | 65 | 1 |
2021-10-19 04:10:56 | Australia | 58 | 36 |
2020-06-19 01:35:27 | Germany | 74 | 2 |
2023-03-04 04:32:10 | India | 46 | 24 |
2020-10-24 16:09:58 | USA | 12 | 15 |
2023-11-19 07:26:51 | USA | 16 | 8 |
2021-07-13 17:35:51 | Russia | 57 | 19 |
2024-01-08 00:04:59 | Canada | 64 | 35 |
2020-10-11 16:53:15 | Japan | 34 | 23 |
2024-02-10 20:03:29 | Japan | 32 | 16 |
2023-02-09 21:06:01 | Canada | 78 | 7 |
2023-12-24 23:02:09 | USA | 77 | 18 |
2020-01-13 18:58:58 | Brazil | 74 | 38 |
2024-05-13 22:04:50 | Canada | 79 | 29 |
2021-12-23 17:30:09 | Australia | 47 | 44 |
2020-11-09 08:59:11 | Japan | 70 | 39 |
2024-04-04 21:42:57 | China | 57 | 42 |
2024-02-04 07:59:05 | Canada | 28 | 12 |
2020-05-28 20:56:00 | France | 74 | 46 |
2023-01-18 20:17:56 | India | 22 | 9 |
2021-12-02 06:32:44 | Japan | 9 | 39 |
2022-05-30 07:50:43 | Australia | 20 | 45 |
2022-08-26 14:04:46 | Japan | 36 | 36 |
2020-09-27 00:03:34 | USA | 44 | 2 |
2022-01-20 11:04:21 | Canada | 39 | 48 |
2024-07-04 09:41:48 | Russia | 8 | 27 |
2020-10-26 11:24:36 | Brazil | 46 | 31 |
2020-08-28 18:13:44 | China | 92 | 21 |
2023-10-03 16:57:49 | France | 90 | 26 |
2023-04-18 02:42:42 | Brazil | 15 | 27 |
2020-09-10 18:37:22 | Germany | 50 | 23 |
2020-11-20 14:32:17 | Russia | 35 | 17 |
2024-05-22 14:55:43 | France | 9 | 41 |
2020-11-20 14:13:32 | Japan | 1 | 2 |
2023-06-14 12:22:10 | China | 80 | 9 |
2023-12-28 22:45:50 | India | 49 | 15 |
2020-03-05 02:13:34 | China | 70 | 19 |
2021-09-20 23:28:50 | Canada | 42 | 7 |
2024-04-15 07:28:55 | Brazil | 12 | 4 |
2021-06-03 11:25:55 | Brazil | 78 | 43 |
2023-12-21 15:13:35 | China | 63 | 31 |
2024-02-05 15:01:11 | Australia | 32 | 40 |
2024-06-11 23:34:42 | Australia | 60 | 34 |
2021-03-24 07:26:02 | Canada | 24 | 22 |
2020-07-20 03:53:09 | Brazil | 61 | 4 |
2023-02-10 04:58:27 | Russia | 52 | 33 |
2022-01-07 18:33:53 | Australia | 42 | 24 |
2024-11-27 21:08:17 | Canada | 12 | 21 |
2020-04-13 11:01:21 | USA | 66 | 10 |
2020-07-17 20:52:13 | Brazil | 61 | 41 |
2020-08-09 11:45:30 | France | 60 | 25 |
2021-08-20 06:10:58 | USA | 96 | 50 |
2022-08-28 02:42:44 | Germany | 58 | 47 |
2023-09-03 19:49:59 | India | 11 | 20 |
2024-06-19 12:35:31 | China | 86 | 18 |
2022-01-31 16:39:01 | Germany | 84 | 45 |
2024-03-05 08:15:04 | USA | 63 | 50 |
2022-07-11 21:21:56 | Russia | 25 | 19 |
2020-06-24 19:56:56 | USA | 68 | 42 |
2024-03-25 21:16:12 | Australia | 52 | 19 |
2024-03-09 08:43:35 | Germany | 33 | 27 |
2024-10-12 03:53:52 | China | 98 | 44 |
2024-07-21 09:41:11 | Japan | 97 | 37 |
2023-10-05 10:07:38 | Japan | 98 | 46 |
2022-04-11 23:59:51 | Canada | 49 | 5 |
2023-11-09 06:00:43 | Canada | 91 | 29 |
2020-07-11 20:44:54 | Germany | 76 | 38 |
2024-09-14 22:07:51 | Canada | 55 | 35 |
2022-11-02 12:43:48 | Japan | 75 | 6 |
2024-08-13 18:56:24 | Brazil | 3 | 24 |
2022-09-06 16:43:55 | USA | 93 | 10 |
2021-03-30 12:30:33 | Canada | 15 | 9 |
2023-11-25 01:16:04 | China | 64 | 20 |
2024-05-03 23:02:16 | Germany | 4 | 50 |
2022-01-02 23:01:09 | China | 39 | 20 |
2021-03-16 05:39:30 | Australia | 33 | 8 |
2023-10-12 03:46:54 | France | 35 | 6 |
2021-04-05 23:47:19 | China | 73 | 45 |
2024-03-22 15:36:25 | China | 68 | 3 |
2021-11-19 13:28:59 | France | 53 | 43 |
2021-10-05 08:06:35 | USA | 14 | 35 |
2022-03-25 07:18:38 | China | 65 | 31 |
2020-10-07 22:50:35 | Canada | 66 | 45 |
2024-07-11 00:29:18 | India | 25 | 35 |
2023-08-21 09:00:18 | Canada | 14 | 47 |
2022-08-03 00:17:41 | Canada | 17 | 46 |
2020-12-14 12:57:42 | USA | 86 | 23 |
2024-05-04 03:34:35 | Brazil | 85 | 4 |
2023-04-02 01:01:07 | Brazil | 76 | 16 |
2023-06-20 10:04:36 | China | 100 | 22 |
2020-09-11 19:21:38 | USA | 36 | 37 |
2023-12-14 07:49:27 | China | 13 | 13 |
2023-03-22 07:31:09 | India | 35 | 50 |
2021-10-03 03:07:26 | Russia | 3 | 37 |
2024-11-07 09:57:49 | Brazil | 97 | 38 |
2023-08-22 02:34:05 | Australia | 19 | 6 |
2021-08-07 12:13:59 | Germany | 39 | 47 |
2021-01-18 04:31:17 | Canada | 96 | 13 |
2024-11-20 02:25:40 | France | 47 | 24 |
like this
now i have to get
ytd
ytd grwoth %(like 2022vs2023 and when some value is blank it shows 0 like after 2024 feb it should show 0)
cluster column kine chart
x axis
year month week day
now i have to do it so it can be drill down and everything and check data
So if we drill it to day or drill to years it will work
and could you please also help me with ytd growth
You mean YoY growth. That is usually done as
DIVIDE(current-sply,abs(sply),0)
Year over year not working for weeks
Works for me - you just need to use the separate computation with the -364. All others can use SAMEPERIODLASTYEAR.