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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Implementing YTD, MTD, and Today via ChicletSlicer

I have a table that has Sales data. The columns are GrossSalesAmount and Date. I want to use the ChicletSlicer to categorize the data into 3 date filters: Year-To-Date (YTD), Month-To-Date (MTD), and Today (TOD).

what I did so far is the following: I created a calculated column that gives each row a value: Y (for Year), M (for Month), and T (for Today). If the value of Date is for today, it will give the value T. Else, if the value of the date is the current month, it will give the value M. Else, if the value of the date is the current year, it will give the value Y. Else, it will give the row the value N (for None). The table will look something like this (for example's sake, assume today is February 13th 2019):

GrossSalesAmount | Date | Filter
------------------------------------------------------
12,333 | 13 Feb 2019 | T
------------------------------------------------------
444,444 | 10 Feb 2019 | M
------------------------------------------------------
444,444 | 4 Feb 2019 | M
------------------------------------------------------
111,111 | 24 Jan 2019 | Y
------------------------------------------------------
111,111 | 15 Jan 2019 | Y

Now, I created another table called Filter which has One colmn, Category, with 3 values: Y, M, and T. I created a one-to-many Single relationship between Category (from Filter table) and Filter (from Sales table).
The ChicletSlicer uses the column Category to list the 3 filters Y, M, and T.

What I want is the following: when the user clicks on T, it will show him the Sales data of the row that has the value T. If the user clicks on M, it will show him the Sales data of the rows labeled BOTH T and M. If the user clicks on Y, it will show him the Sales data of the rows labeled T AND M AND Y.

How do I do this?

3 REPLIES 3
Anonymous
Not applicable

I'm still struggling with this issue. Can someone help me?

Greg_Deckler
Community Champion
Community Champion

If I am reading this correctly, you want to use your slicer to filter your rows but not 100% one-to-one. Generally, to do this you use a dynamic measure and essentiallly the "disconnected table trick". In general, to use a measure in that way, you need to use the Disconnected Table Trick as this article demonstrates: https://community.powerbi.com/t5/Community-Blog/Solving-Attendance-with-the-Disconnected-Table-Trick....



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

I read the link you posted. It looks like it works for matrixes only...I need to display data in a clustered bar chart. Is there an additional step to do when it comes to bar charts?

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

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.