Forum Discussion
cottrera
4 years agoPost Prodigy
PREVIOUSMONTH - Not working
Hi
I am having some trouble with DAX and PREVIOUSMONTH. When I display the results in a visual table it works. However when I display the results in a visual card its Blank?
Here are my measures
Stock Surveys = COUNTROWS('Property Stock Condition Surveys'
Surveys Completed =
CALCULATE(
[Stock Surveys],
USERELATIONSHIP('Property Stock Condition Surveys'[Date Completed],
'SHARED Calendar'[PKDate])
)
Surveys Comp Previous Mth =
CALCULATE([Surveys Completed],
PREVIOUSMONTH('SHARED Calendar'[PKDate])
I have a facts table related to a dates table (marked as dates table)
Thank you
Richard
2 Replies
- AlexanderPrimeSolution Supplier
Initial thoughts, does the visual card have a date to measure from? There doesn't seem to be anything in your code to declare what to look for the PreviousMonth should be from. (ie. no TODAY call)
The table will work as there's a date column for the code to run off, but the does the card have anything to declare the date to compare against?
- cottreraPost Prodigy