Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
VR7
Frequent Visitor

MTD & %YOY in Card Visual

Hi,

 

I have dataset of number of claim submitted from client and want to show  in MTD value and YOY compare with last year number. My DAX formula result is correct in table but show blank value in card.

 

Please help in this issues,

1. Show MTD in card visual (1878)

2. Iwant to show %YOY as of today (my data as of 14/1/2020 so should show 11.26%) not show total change like this

 

Thanks in advance

 

 

 

YOY_PERCENT_GROWTH_YTD_NUMBER_OF_CLAIM = DIVIDE(CLAIMS_DATASET[YOY_GROWTH_YTD_NUMBER_OF_CLAIM],[PRV_YTD_NUMBER_OF_CLAIM])

 

 

 

 

 

MTD_NUMBER_OF_CLAIM = TOTALMTD(CLAIMS_DATASET[TOTAL_NUMBER_OF_CLAIM], 'DIM_DATE'[Date].[Date])

 

 

 

Capture.JPG

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

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

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

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

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi @amitchandak ,

 

Thank you for your reply.

 

Is it possible to show MTD in present month without select month in slicer?

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.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.