The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hello. I need to calculate the difference between the dates of different applications:
Field | Application | Date |
P1 | 1st | 01/01/2024 |
P2 | 1st | 01/05/2024 |
P1 | 2nd | 01/20/2024 |
P2 | 2nd | 01/22/2024 |
P1 | 3rd | 02/10/2024 |
P2 | 3rd | 02/11/2024 |
P1 | 1st | 02/15/2024 |
P2 | 1st | 02/15/2024 |
P1 | 2nd | 02/27/2024 |
P2 | 2nd | 02/28/2024 |
P1 | 3rd | 03/10/2024 |
P2 | 3rd | 03/11/2024 |
P1 | 1st | 03/14/2024 |
P2 | 1st | 03/16/2024 |
P1 | 2nd | 03/20/2024 |
P2 | 2nd | 03/24/2024 |
P1 | 3rd | 04/02/2024 |
P2 | 3rd | 04/05/2024 |
I need a column or measure to calculate the difference in date averages from different applications of the same Field. For example, the difference between the average dates of the 2nd Application and 1st Application of Field P1, the difference between the average dates of the 3rd Application and 2nd Application of Field P1, and so on for all Fields.
Solved! Go to Solution.
Hi,
Write this calculated column formula
Column = if(ISBLANK(CALCULATE(MAX(Data[Date]),FILTER(Data,Data[Field]=EARLIER(Data[Field])&&Data[Date]<EARLIER(Data[Date])))),BLANK(),1*(Data[Date]-CALCULATE(MAX(Data[Date]),FILTER(Data,Data[Field]=EARLIER(Data[Field])&&Data[Date]<EARLIER(Data[Date])))))
hope this helps.
Hi,
Write this calculated column formula
Column = if(ISBLANK(CALCULATE(MAX(Data[Date]),FILTER(Data,Data[Field]=EARLIER(Data[Field])&&Data[Date]<EARLIER(Data[Date])))),BLANK(),1*(Data[Date]-CALCULATE(MAX(Data[Date]),FILTER(Data,Data[Field]=EARLIER(Data[Field])&&Data[Date]<EARLIER(Data[Date])))))
hope this helps.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
109 | |
77 | |
76 | |
43 | |
37 |
User | Count |
---|---|
156 | |
109 | |
64 | |
60 | |
55 |