Forum Discussion
problem with slicer and dynamic dates
Hi acco,
I think something is missing in my perception of your problem because I have made a sample with the date you show and if I do the following measures they return the correct result, however my slicer are made based on PaymentDay, should they be based on CoverEndDay?
YTD = TOTALYTD(SUM(Table1[Income]);Table1[PaymentDay]) YTD-LY = TOTALYTD(SUM(Table1[Income]);DATEADD(Table1[PaymentDay];-1;YEAR))
Can you plewase prepare a PBIX with the data and slicers that you want so that I can check if I'm not calculating everything as you need.
Regards
Mfelix
Hallo MFelix, This morning I've found a solution (extremely commonplace...) that consists to use the 3rd parameter passing it as filter the FILTER function with MAX(PaymentDay) so it give it to me a correct value for current year and last year (anyway I've attached a example pbix file to check).
But it's not over yet :smileyfrustrated: in my idea I would insert another object to show, month by month, the difference of total income now and in the same period past year. If I use the measure, that consist in the difference of this year less previous year, Power BI return an error telling that the measure, with DATEADD, should have contigous dates... :smileysad:
Best Regards
Fabio