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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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