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! Request now

Reply
asdf1608
Helper V
Helper V

To select week, mtd, quarter based on parameter

I have created a parameter week, mtd,qtd, quarter. 

If week is selected that particular week's data should be shown.

For example if I have selected week the records of this week should be shown in table.

I have created calculated field for all the values in parameter.

Qtd = QUARTER('Table'[Joined]) = QUARTER(TODAY())
Quarter = DATEDIFF('Table'[Joined],TODAY(),QUARTER)=1
Week = DATEDIFF('Table'[Joined],TODAY(),DAY)<=7.
 
How do I get this as filter in power BI.
For example:
asdf1608_0-1693915225693.png

If week is selected onl this weeks value should be shown.

I have attached the pbi file:

Sample.pbix

How to do this in power Bi

 

Help in this is needed.

Thanks in advance

 

1 ACCEPTED SOLUTION
ChiragGarg2512
Solution Sage
Solution Sage

Display slicer is not connected in any way to the table visual. A measure is needed so that the value changes in the visual.

Reference this DAX: 

Switch ( selectedvalue(Dates[Display]) ,
"Week", calculate(sum(Table[Salary]), filter(Table, 'Table'[Week]= TRUE())),
"mtd", calculate(sum(Table[Salary]), filter(Table, 'Table'[Mtd]= TRUE())),
"quarter", calculate(sum(Table[Salary]), filter(Table, 'Table'[Quarter]= TRUE())),
"qtd", calculate(sum(Table[Salary]), filter(Table, 'Table'[Qtd]= TRUE()))
)
Make changes according to tables and convenience. 

View solution in original post

2 REPLIES 2
ChiragGarg2512
Solution Sage
Solution Sage

Display slicer is not connected in any way to the table visual. A measure is needed so that the value changes in the visual.

Reference this DAX: 

Switch ( selectedvalue(Dates[Display]) ,
"Week", calculate(sum(Table[Salary]), filter(Table, 'Table'[Week]= TRUE())),
"mtd", calculate(sum(Table[Salary]), filter(Table, 'Table'[Mtd]= TRUE())),
"quarter", calculate(sum(Table[Salary]), filter(Table, 'Table'[Quarter]= TRUE())),
"qtd", calculate(sum(Table[Salary]), filter(Table, 'Table'[Qtd]= TRUE()))
)
Make changes according to tables and convenience. 

@ChiragGarg2512  Thank you so much for your help.

It worked.

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.