Forum Discussion
MTD & %YOY in Card Visual
- 6 years ago
In case of MTD remove .date
MTD_NUMBER_OF_CLAIM = TOTALMTD(CLAIMS_DATASET[TOTAL_NUMBER_OF_CLAIM], 'DIM_DATE'[Date])Current MTD will only come when we select the month. else it will take end date of calendar as date.
You can put a slicer or restrict max date of calendar.
In case of YTD, either select a date in slicer of push a filter
Example
YTD_NUMBER_OF_CLAIM = var _max = maxx(CLAIMS_DATASET,CLAIMS_DATASET[Date]) return calculate(TOTALYTD(CLAIMS_DATASET[TOTAL_NUMBER_OF_CLAIM], 'DIM_DATE'[Date]),'DIM_DATE'[Date] <=_max )\\Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP, HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Connect on Linkedin
In case of MTD remove .date
MTD_NUMBER_OF_CLAIM = TOTALMTD(CLAIMS_DATASET[TOTAL_NUMBER_OF_CLAIM], 'DIM_DATE'[Date])
Current MTD will only come when we select the month. else it will take end date of calendar as date.
You can put a slicer or restrict max date of calendar.
In case of YTD, either select a date in slicer of push a filter
Example
YTD_NUMBER_OF_CLAIM =
var _max = maxx(CLAIMS_DATASET,CLAIMS_DATASET[Date])
return
calculate(TOTALYTD(CLAIMS_DATASET[TOTAL_NUMBER_OF_CLAIM], 'DIM_DATE'[Date]),'DIM_DATE'[Date] <=_max )
\\Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP, HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Connect on Linkedin
Hi amitchandak ,
Thank you for your reply.
Is it possible to show MTD in present month without select month in slicer?
- amitchandak6 years agoSuper User
In visual level filter drag the date (date used in MTD or ytd) and use relative date filter and set it to this month , today etc.