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.
How to calculate the days between the first order and the second order
order table :
account#, year,qurter,month,day
11111 2016 Q3 April 10
11111 2016 Q3 April 15
I want to get
account daye_betwen_purchas
111111 5
I tried to use with Matrix or to calculate with LASTDATE function , but didnt worked well , what is the recomnded approach
Solved! Go to Solution.
Hi There,
For such calculations, you should create a Index column in the Query Editor and Load the Query.
In the modelling stage, create a calculated column shown in the screenshot to view the expected result.
Could another option not be to unpivot the data, so that you get the first order date and second order date on one column?
Then you could easily use the DateDiff DAX syntax (https://msdn.microsoft.com/en-us/library/dn802538.aspx?f=255&MSPPError=-2147217396)
Could another option not be to unpivot the data, so that you get the first order date and second order date on one column?
Then you could easily use the DateDiff DAX syntax (https://msdn.microsoft.com/en-us/library/dn802538.aspx?f=255&MSPPError=-2147217396)
Hi There,
For such calculations, you should create a Index column in the Query Editor and Load the Query.
In the modelling stage, create a calculated column shown in the screenshot to view the expected result.
works fine , Thanks !!
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 |
---|---|
112 | |
97 | |
85 | |
67 | |
59 |
User | Count |
---|---|
150 | |
120 | |
99 | |
87 | |
68 |