Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
In a KPI i have this difference to get the sum of this expression for the max(visitdate) of all dataset
sum( {<[visitdate]={ '$(= max([visitdate] ))' },[availability]={'available'} >} [amount purchased]) - sum( { < WeekDay = {'$(= weekday( max(date([visitdate] ),'DD/MM/YYYY')))'} , Week= {'$(=week(max([visitdate] )))'}, Year = {'$(=year(max([visitdate] ))-1)'},[availability]={'available'} > } [amount purchased] )
When I put this difference as a measure in a chart with dimension each Client name that has different max visit dates, so a lot haven't visited on the total max date , I get screwed up results for the difference UNLESS i click on a certain client in the chart and then the numbers are correct like the KPI (that then takes into account their max visit date).
What i mean is: when i select a client from the filter Client, the kpi returns correct results.
How do i fix this?
@ioannagr I can't tell you if what you are getting is correct or not... can you share a sample and provide the output you expect to see from it. The sample doesn't have to be real data, it can be dummy data, but just able to show your issue.
@sunny_talwar it's okay, i found out, thanks 🙂
My kpi needed to add date(, 'DD/MM/YYYY') for correct calculations.