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
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
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.