Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
My requirement is to display YTD and PreviousYTD data for 'Books Sold' in pivot table.
For YTD, I am using expression as: count({$<Date={">=$(=date(YearStart(max(Date)), 'YYYY-MM-DD')) <=$(=date(max(Date), 'YYYY-MM-DD'))"}>} BookId)
For PrevYTD: count({$<Date={">=$(=date(YearStart(max(Date),-1), 'YYYY-MM-DD')) <=$(=date(addmonths(max(Date),-12), 'YYYY-MM-DD'))"}>} BookId)
I am using a string expression as 'Dimension' in pivot table and above two measures.
However it is not showing correct data. It is only showing data for the selected date and not the YTD.
In another pivot table (which also has only string expression as 'Dimension'), I am showing YTD and PrevYTD for revenue generated from books.
However it is showing correct data.It is showing data only for the selected date.
The only difference is for 'Books Sold' I am using 'Count' function and for Revenue, I am using 'Sum' function.
Please help me out.
Thanks in advance.