"power bi old version"
1 TopicColumn Query Works sometimes but not for each row.
Hello - I have recently written a query to caulcate service dates for a number of products, they should be serviced anually or twice per year depending on the frequency, within a year of the Start Date. However, I noticed that not all data is populating despite there seemingly being nothing wrong with the code and, in some cases, the information does populate. Here are the codes: PM1 = IF ( ISBLANK ( PM_date_kpo[SVMXC__Start_Date__c].[Date] ), BLANK (), SWITCH ( VALUE(PM_date_kpo[PM_Interval]), -- Convert to Integer using VALUE function 6, DATEADD ( PM_date_kpo[SVMXC__Start_Date__c].[Date], 6, MONTH )-1, 12, DATEADD ( PM_date_kpo[SVMXC__Start_Date__c].[Date], 1, YEAR )-1, PM_date_kpo[SVMXC__Start_Date__c].[Date] ) ) And then: PM2 = IF ( ISBLANK ( PM_date_kpo[PM1].[Date] ), BLANK (), SWITCH ( VALUE(PM_date_kpo[PM_Interval]), -- Convert to Integer using VALUE function 6, DATEADD ( PM_date_kpo[PM1].[Date], 6, MONTH ), 12, DATEADD ( PM_date_kpo[PM1].[Date], 1, YEAR ), PM_date_kpo[PM1].[Date] ) ) for PM3-PM10 the code is the exact same except the reference to the previous PM changes. The table below is a sample output from the query. I cannot understand why sometimes it works and other times it doesn't. From my understanding, as long as Start Date isn't blank, then PM1 - PM10 should populate without issue however as you can see it does not, even when the previous PM has a value. Is there any noticeable issue or way to mitigate this problem? SVMXC__Start_Date__c PM1 PM3 PM4 10/1/2021 9/30/2022 9/30/2024 3/1/2022 8/31/2022 8/28/2023 2/28/2024 3/1/2022 8/31/2022 8/28/2023 2/28/2024 3/1/2022 8/31/2022 8/28/2023 2/28/2024 5/18/2022 5/17/2023447Views0likes1Comment