Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Let say the input date for all the below dates is "Date(2019,10,30)"...
Following are the output that is required... Please help...
1. BeforeSales3Months --> date(2019,7,31)
2. SalesLast3Month --> date(2019,10,31)
3. SalesNext3Month --> date(2020,1,31)
4. SalesOlderThanThisMonth --> date(2019,9,30)
5. SalesThisMonth --> date(2019,10,31)
6. SalesNextMonth --> date(2019,11,30)
I need date functions which can get me the above output. I am also searching for the required date functions in google which can get me the above output.
Solved! Go to Solution.
You may refer to the DAX below.
Measure =
VAR d =
DATE ( 2019, 10, 30 )
VAR m = -3
RETURN
DATE ( YEAR ( d ), MONTH ( d ) + m + 1, 1 ) - 1
You may refer to the DAX below.
Measure =
VAR d =
DATE ( 2019, 10, 30 )
VAR m = -3
RETURN
DATE ( YEAR ( d ), MONTH ( d ) + m + 1, 1 ) - 1
Hi @pbiforum123 ,
There are DAX functions available which helps you to calculate these requirement. And you can also use Date Column as a slicer with Relative option.
1. BeforeSales3Months = CALCULATE(Sum(Table[Sales]),DATESADD(Table[DateCOlumn],-3,MONTH))
2. SalesLast3Month --> date(2019,10,31) ?? I am confused at this measure. What do you wanna display?
3. SalesNext3Month --> CALCULATE(Sum(Table[Sales]),DATESADD(Table[DateCOlumn],3,MONTH))
4. SalesOlderThanThisMonth --> CALCULATE(Sum(Table[Sales]),PREVOIUSMONTH(Table[DateColumn]))
5. SalesThisMonth --> CALCULATE(SUM(Table[Sales]),PARALLELPERIOD(Table[ColumnDate],0,MONTH))
6. SalesNextMonth --> CALCULATE(Sum(Table[Sales]),DATESADD(Table[DateCOlumn],1,MONTH))
Please give Thumps up for support and accept this as a solution if it helps you!
Thanks a lot for your response...
Regarding the pt2, it has to get the End of the Month of Date(2019,10,30), which will be 2019,10,31
By the way I dont want to calculate Sales using these functions.
I need the output in exactly the way I mentioned as I am passing these dates in the Date buckets in the matrix... Please refer below link for more understanding..
Hi @pbiforum123 ,
You can also use Relative Date slicer in order to see all those values and play around by changing its option. (Screen shot is attached)
Please give Thumps up for support and accept this as a solution if it helps you!
I need in this format only for the reasons mentioned above...
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
94 | |
80 | |
67 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |