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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
ak77
Post Patron
Post Patron

Filtering Issue. Please help

Hi Team,

 

I need help for for the below DAX Calculation

 

i have the below table with the date slicer. Code,benchmark Name and Currency are the columns and MTD,YTD..Etc are the time intelligence measures. i want to calculate the Measures only by  Code and currency Column  with Date filter. 

 

Currently the filtering is Code,Benchmark_Name and currency Columns with Date filter.. Can Please someone help

 

ak77_0-1696867925971.png

 

1 ACCEPTED SOLUTION
parry2k
Super User
Super User

@ak77 

As a best practice, add a date dimension in your model and use it for time intelligence calculations. Once the date dimension is added, mark it as a date table on table tools. Check the related videos on my YT channel

 

Add Date Dimension
Importance of Date Dimension
Mark date dimension as a date table - why and how?
Time Intelligence Playlist

 

Once you have  calendar table, use it for the slicer, and then add the respective measure using this calendar table, for example MTD/YTD/QTD will look like this:

 

Base Measure = SUM ( Table[Sales] )

MTD Sales = CALCULATE ( [Base Measure], DATESMTD ( 'Calendar'[Date] ) )
QTD Sales = CALCULATE ( [Base Measure], DATESQTD ( 'Calendar'[Date] ) )
YTD Sales = CALCULATE ( [Base Measure], DATESYTD ( 'Calendar'[Date] ) )


Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

2 REPLIES 2
ak77
Post Patron
Post Patron

@parry2k , perfect soln. Thanks

parry2k
Super User
Super User

@ak77 

As a best practice, add a date dimension in your model and use it for time intelligence calculations. Once the date dimension is added, mark it as a date table on table tools. Check the related videos on my YT channel

 

Add Date Dimension
Importance of Date Dimension
Mark date dimension as a date table - why and how?
Time Intelligence Playlist

 

Once you have  calendar table, use it for the slicer, and then add the respective measure using this calendar table, for example MTD/YTD/QTD will look like this:

 

Base Measure = SUM ( Table[Sales] )

MTD Sales = CALCULATE ( [Base Measure], DATESMTD ( 'Calendar'[Date] ) )
QTD Sales = CALCULATE ( [Base Measure], DATESQTD ( 'Calendar'[Date] ) )
YTD Sales = CALCULATE ( [Base Measure], DATESYTD ( 'Calendar'[Date] ) )


Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.