Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Team,
I have 2 Measures,
1. Sum(Actual)
2. Sum(Plan)
I have the records from 1st Jan 2018 till Date
The requirement is , i have to count the no of distinct days where my sum(Actual) < sum(Plan).
Can anyone help me on this
Hi, If there is a date field in the model try this
Sum(if(Aggr(sum(Actual) - sum(Plan), DateField) < 0, 1, 0))
Hi Senthil,
If you want to calculate for all days , then you can use =Date2-Date1
And if you want to calculate working day, then use =Networkdays (StartDate, EndDate {, Holiday})
You can write the expression as ,
if (sum(Actual) < sum(Plan),Networkdays (StartDate, EndDate {, Holiday}))
or
if (sum(Actual) < sum(Plan),Date2-Date1)
The Networkdays () returns the number of working days (Monday-Friday) between and including StartDate and EndDate taking into account any optionally listed holidays. All parameters should be valid dates or timestamps.
Thanks,
Madhura