Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
dhasharadh
Creator III
Creator III

need to avoid Start Date is more than End Date seanarios in expression...?

Hi All, 

below is expression of calculated dimension, where as expression is Count(IDs) and Column is End Month. 

there is a data issue which is Start Date is Greater than End Date, so am getting this CM - - 1 row in the pivot table.

as it will take much time in changing the ETLs and correct the data issue, now we decided to go ahead with same data, so now i have to edit my condition in such a way that it should avoid those records, so  that we can avoid that CM -- 1 row. but my below formula is not helping. 

dhasharadh_0-1634987388325.png

 

Calculated Dimension :

If(Monthstart(End Date) = Monthstart(Scheduled Date), 

   (

   If

   ( 

   Round(Interval(Monthstart(End Date) - Monthstart(Start Date),'dd') / 30) <12,

   'Current Month - '&Round(Interval(Monthstart(End Date) - Monthstart(Start Date),'dd') / 30),

   'Current Month - 12+')

   )

   , 'Unknown')

 

Much appreciate your response. @tresesco @sunny_talwar @jagan @Anil_Babu_Samineni 

1 Reply
rubenmarin

Hi, if that's your current dimension and it works, I think you only need to enclose that expression in another if that excludes start dates haigher than end dates:

If([Start Date]>[End Date], Null(), [Your current dimension])