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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
themistoklis
Community Champion
Community Champion

Slicer with selection of Date Periods (Year, Quarter, Month) that come from multiple columns

Hello All,

 

Im trying to create a slicer where I can select the period that I want (e.g. year, month and quarter) and the the date period will be populated with the correct values (First column in image below).

 

The date periods (year, quarter, month) are stored in seperate fields in a Calendar table in the report

 

Although I have seen an article explaining the methodology on how to do it... im struggling to find it.

 

Any help will be much appreciated

 

Date_Period.png

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi, @themistoklis 

Please correct me if I wrongly understood your question.

Please check the below picture, link, and measure whether it is what you are looking for.

 

Qty Total =
SWITCH (
SELECTEDVALUE ( 'Period Slicer'[Type] , "Year"),
"Year",
CALCULATE (
SUM ( Sales[Qty] ),
TREATAS ( VALUES ( 'Period Slicer'[Period] ), Dates[Year] )
),
"Quarter",
CALCULATE (
SUM ( Sales[Qty] ),
TREATAS ( VALUES ( 'Period Slicer'[Period] ), Dates[Quarter & Year] )
),
"Month",
CALCULATE (
SUM ( Sales[Qty] ),
TREATAS ( VALUES ( 'Period Slicer'[Period] ), Dates[Month & Year] )
),
"Week",
CALCULATE (
SUM ( Sales[Qty] ),
TREATAS ( VALUES ( 'Period Slicer'[Period] ), Dates[Week & Year] )
),
"Checkagain"
)
 
Picture1.pngPicture2.png
 
 
 
 

Hi, My name is Jihwan Kim.


If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.


Linkedin: https://www.linkedin.com/in/jihwankim1975/


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

5 REPLIES 5
Jihwan_Kim
Super User
Super User

Hi, @themistoklis 

Please correct me if I wrongly understood your question.

Please check the below picture, link, and measure whether it is what you are looking for.

 

Qty Total =
SWITCH (
SELECTEDVALUE ( 'Period Slicer'[Type] , "Year"),
"Year",
CALCULATE (
SUM ( Sales[Qty] ),
TREATAS ( VALUES ( 'Period Slicer'[Period] ), Dates[Year] )
),
"Quarter",
CALCULATE (
SUM ( Sales[Qty] ),
TREATAS ( VALUES ( 'Period Slicer'[Period] ), Dates[Quarter & Year] )
),
"Month",
CALCULATE (
SUM ( Sales[Qty] ),
TREATAS ( VALUES ( 'Period Slicer'[Period] ), Dates[Month & Year] )
),
"Week",
CALCULATE (
SUM ( Sales[Qty] ),
TREATAS ( VALUES ( 'Period Slicer'[Period] ), Dates[Week & Year] )
),
"Checkagain"
)
 
Picture1.pngPicture2.png
 
 
 
 

Hi, My name is Jihwan Kim.


If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.


Linkedin: https://www.linkedin.com/in/jihwankim1975/


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Hi @Jihwan_Kim . Awesome content. Would you mind to share the pbix file again? Thanks 🙂

Hi,

Thank you for your feedback.

Sorry to say that I could not find the file in my computer since it has been quite a long time I created this.

By the way, this solution is, I think, already an old way. Because now we have the feature called "Field Parameter" in Power BI Desktop. This is exactly providing the same and awesome solution for the above and it is much easier. There are many Youtube videos out there (less than 10 minutes) talking about "Field Parameter" in Power BI. You can simply search for the videos by entering "Field Parameter in Power BI".


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Thanks @Jihwan_Kim 🙂 Appreciated your time on replying.

Hello @Jihwan_Kim 

 

This is what I needed. Thanks a lot for your answer.

This will save me time.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.

Top Solution Authors