cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

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
Highlighted
Resident Rockstar
Resident Rockstar

Re: Dynamic Filter in a Calculated Column - No Relationship

Hi @jmcruice ,

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
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

July 2020 Community Highlights

July 2020 Community Highlights

Learn about the exciting things that happened in July.

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

We are thrilled to announce we will begin running a monthly webinar series named Power BI Dev Camp.

Power BI Desktop August 2020 Update

Power BI Desktop August 2020 Update

We have great updates this month! Click the link for the video with more info.

Top Solution Authors
Top Kudoed Authors