Forum Discussion
Anonymous
6 years agoNot applicable
Comparing current vs last year sales - multiple date columns
Hello, I have a sales table that looks as follows: How can I calculate the columns Count 2020, Count 2019, by using the As of date column as a filter in a visual? Ej: As of date:...
- Anonymous6 years ago
Hi Anonymous ,
Pbix as attached, hopefully works for you.
Best Regards,
Jay
Community Support Team _ Jay Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
6 years agoNot applicable
Thank you for checking Greg_Deckler .
I got the following error in the output table: Can't display the visual:
MdxScript(Model) (133,44) Calculation error in message ('table'[Measure 2]: An argument of function 'DATE' has the wrong data type or the result is too large or too small.
I changed the value type to Whole number, and I'm still getting the error.
Can you please check?
Greg_Deckler
Community Champion
6 years agoAre you getting this with nothing selected in your Date slicer? Probably need to return some date value using the optional parameters for SELECTEDVALUE to return a default?
- Anonymous6 years agoNot applicable
I'm getting the message with both date selected, and no date selected in the slicer.