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
ecoquelet
Frequent Visitor

Keep a legacy of a filter, filter a table dynamically

Hello!

 

I need some help with DAX expressions. 

 

The context: I have a table with 3 columns: project names, efficiency in percent for each project and quarter. The table is for one year, so I have 4 quarters in quarter column. The projects are not always the same according to the quarter.

 

Capture d’écran 2022-10-31 181551.png

 

What I need is to select a quarter with a quarter slicer (let's say Q2) and see the general productivity during the year, by each quarter. But only for projects that we can see in Q2 (A and C) and not all the projects together. (For exemple, if there were 45 projects in Q2 and 50 in Q3 I need a history only about those 45).

 

chart.png

 I tried several ideas as créatin a variable with list of projects in selected quarter and comparing after this list of projects with all the projects with FILTER, ALLSELECTED and IN, but I get "columns can't be converted to scalar value" mostly for all my tries. 

 

Should it be something like tables created with SUMMARIZECOLUMN ?

 

Thank you in aadvance !

1 ACCEPTED SOLUTION
ValtteriN
Super User
Super User

Hi,

Here is one approach to this:

Data:

ValtteriN_0-1667380408574.png

 

Dax:

calculate quarter values = CALCULATE(COUNT('Table (9)'[Project]),MAX('Calendar'[Q])='Table (9)'[Quarter])

Note:

There is no relationship between my calendar and table (9).

Result:

When selecting Q 1-3 all projects are displayed:

ValtteriN_1-1667380486844.png

 

When selecting Q4 P3 is disregarded in calculation since it doesn't have data on Q4:
ValtteriN_2-1667380525459.png

 

Using this logic you should be able to create the measure you want.

I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!

My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/







Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

1 REPLY 1
ValtteriN
Super User
Super User

Hi,

Here is one approach to this:

Data:

ValtteriN_0-1667380408574.png

 

Dax:

calculate quarter values = CALCULATE(COUNT('Table (9)'[Project]),MAX('Calendar'[Q])='Table (9)'[Quarter])

Note:

There is no relationship between my calendar and table (9).

Result:

When selecting Q 1-3 all projects are displayed:

ValtteriN_1-1667380486844.png

 

When selecting Q4 P3 is disregarded in calculation since it doesn't have data on Q4:
ValtteriN_2-1667380525459.png

 

Using this logic you should be able to create the measure you want.

I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!

My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/







Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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