Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi,
I need to get 3 months sales average data before selected month in power bi. Selected month is not coming from date table. I use it as parameter to calculate [endate]. But DATEADD function doesn't accept date part as measure. I will be appreciate for any help or idea. Than
Create a new end date three months back
endate = DATE(YEAR(datediff(TODAY(),-3,month)), SELECTEDVALUE(Months[Month], MONTH(datediff(TODAY(),-3,month))),1)
Do needed changed.
You need to get a date three months before and do it.
Hi,
Actually I need to get 3 data which dates have to be between first day of selected month and 3 months before selected month (which can be in previous year).
The datediff works on continuous data. This means it will work selected values. Now covert selected value into a date and subtract three months. post that takes a min of it. That is the start date. After you created date, it will not allow you to use date diff.
User | Count |
---|---|
102 | |
84 | |
77 | |
70 | |
67 |
User | Count |
---|---|
113 | |
99 | |
97 | |
72 | |
68 |