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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
DeepakJha23
Helper I
Helper I

Dynamically grouping based on date selection in slicer

Hi Power BI Community,

 

I need some help with the dynamic grouping of data based on slicer selection.

 

DeepakJha23_0-1660985976429.png

I am using the week_end_date as slicer and I am showing the card of response yes and no by month year.

 

For example : if week_end_date 1/15/2022 is selected in slicer, then the yes response should take all the yes for that month year(1/2022) and it should be yes = 25+12 = 37, no = 33+6 = 39.

 

I would appreciate any help on this.

@Greg_Deckler @tamerj1 @amitchandak @MFelix 

1 ACCEPTED SOLUTION
nvprasad
Solution Sage
Solution Sage

Hi Deepak,

You can try with below DAX

result = 
Var selectedweekendMonth = EOMONTH(SELECTEDVALUE(Week_End_Date),-1)+1

Retrun CALCULATE(COUNTROWS(RESPONSES),CALANDER[MONTH] = selectedweekendMonth , RESPONSE = "Yes")

Appreciate a Kudos! ‌‌
If this helps and resolves the issue, please mark it as a Solution! ‌‌

Regards,
N V Durga Prasad

 

Did I answer your question? Mark my post as a solution! Appreciate your Kudos.
Follow me on LinkedIn.

View solution in original post

3 REPLIES 3
nvprasad
Solution Sage
Solution Sage

Hi,

Good to hear, then please select as solution 🙂

 

Did I answer your question? Mark my post as a solution! Appreciate your Kudos.
Follow me on LinkedIn.
nvprasad
Solution Sage
Solution Sage

Hi Deepak,

You can try with below DAX

result = 
Var selectedweekendMonth = EOMONTH(SELECTEDVALUE(Week_End_Date),-1)+1

Retrun CALCULATE(COUNTROWS(RESPONSES),CALANDER[MONTH] = selectedweekendMonth , RESPONSE = "Yes")

Appreciate a Kudos! ‌‌
If this helps and resolves the issue, please mark it as a Solution! ‌‌

Regards,
N V Durga Prasad

 

Did I answer your question? Mark my post as a solution! Appreciate your Kudos.
Follow me on LinkedIn.

@nvprasad Thanks for the solution. It worked .

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Top Solution Authors