Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
ioannagr
Creator III
Creator III

difference measure in chart gives false results

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?

 

11 Replies
sunny_talwar

@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.

ioannagr
Creator III
Creator III
Author

@sunny_talwar  it's okay, i found out, thanks 🙂

My kpi needed to add date(, 'DD/MM/YYYY') for correct calculations.