Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone,
I Have a table with daily report of every store about the quantity.
I have created a pivot table with dimension the store name and expression the qty .
(the user has to select the day(dd/mm/yyyy) from a listbox and the chart will show the quantity for that day for every store.
The next expression I want to be the total quantity from the beggining of the month of the selected date until the selected date.
For example the user selects 04/12/2017 and the resutl of the 2nd expression must be the total quntity from 01/12/2017 until 04/12/2017.
For 3rd expression the YTOD quantity.
How can I write the expressions using set analysis ?
Thank you in advance
Perhaps this?
1) Sum(Measure)
2) Sum({<DateField = {">=$(=MonthStart(Max(DateField))) <=$(=Max(DateField))"}>} Measure)
3) Sum({<DateField = {">=$(=YearStart(Max(DateField))) <=$(=Max(DateField))"}>} Measure)
Perhaps this?
1) Sum(Measure)
2) Sum({<DateField = {">=$(=MonthStart(Max(DateField))) <=$(=Max(DateField))"}>} Measure)
3) Sum({<DateField = {">=$(=YearStart(Max(DateField))) <=$(=Max(DateField))"}>} Measure)
Can you explain with any example.
use expression which anil has given but make sure you will conform proper date format or else it will not wok.
ty
Thank you Anil your suggetion works fine.