Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am trying to find a % change from selected months sales to previous month sale. I have data from Jan to Sep . and filter pane in which values are (Jan, feb, mar to sep) so if I select months, the % change will appear in the KPI.
How should I write set expression keeping these condition in mind? Date field format (2020 -04-24)
Please help!!
Something like I've done below.
Sum(sales) / sum({<Month=, Date={">=$(=monthstart(min(Date), - 1)) <$(=monthend(min(Date),-1)) >} Sales)
Hi Vegar
this is what I am getting . Day_fact is my date field
Hi
PFB I have edited the expression as per data. Day_fact is my date field. it shows null value
See my minor adjustments ' '.
Count (distinct patient_id) / sum(distinct {<Month=, day_fact={">='$(=monthstart(min(day_fact), - 1))' <'$(=monthend(max(day_fact),-1))' >} patient_id)
output
@Ayushs try below
Count (distinct patient_id) / sum(distinct {<Month=, day_fact={">=$(=date(monthstart(addmonths(max(day_fact), - 1))))<=$(=date(monthend(addmonths(max(day_fact), - 1))))" }>} patient_id)
What's wrong with the output?
By the way, it does not look like you are selecting a single month in the screenshot you posted. Your intensely is larger than a month. If so, what period do you want to compare with?