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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Dynamic Filter in a Calculated Column - No Relationship

Good Morning All,

 

I have two tables, one is a direct export (Table 1), and another is a 'dummy' table (Table 2) with one column (Week Endings) consisting of week ending dates for a few years time.  Table 1 has two date columns I'm interested in, BuiltDate and TeardownDate.  I've added two calculated columns to Table 2 the give me a count of tickets Built and Dismantled in the corresponding week ending row.  This creates a visual that shows Built and Dissasembled by week.

 

The DAX I used for the Built Columns is:

 

Built = CALCULATE(COUNTA(Table1[Build Week]),FILTER(ALL(Table1),Table1[Build Week]=[Week Endings]))
With a similar column for Dismantled.
 
It works great, however the issue becomes that Table1 has a multitude of Job #'s (column = number) I need to be able to filter at the page level.  So, I created a measure,  Job = DISTINCT('Table1'[Number]) and then used the following to try and pull the page filter into the equation:
 
BuiltJobTest = CALCULATE(sum(Table1[Hold]),FILTER(Table1, Table1[Job Number]= [Job] && Table1[Build Week]='Week Endings'[Week Endings]))
 
It doesnt work.  It does however work if i hard key the job number in lieu of [Job] however this would take forever to make a set of columns for each job #.
 
Any ideas?
 
 
1 REPLY 1
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous ,

I still have a little confused about your scenario.

To understand it better, could you share the sample data and your desired output so that we could help further on it?

Best  Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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