cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dan_yoxall
Helper I
Helper I

Dynamic filter not working

Hi

 

With the below is an snapshot of the first few of lines of data I am trying to create a line graph of [Cost. Reg] against [Date] but filter the date by [Origin] and [Task].

 

Capture.PNG

 

I used the below measure and it worked fine (see graph further below).  However I want the [Task] filter to be dynamic.  If I create a slide using the [Task] field and omit the text in bold the filter doesn't appear to work.  Any idea why?

 

Cumulative Spend to Date (Time Sheet) =
     CALCULATE(
            SUMX ( 'Project Hours Booked', 'Project Hours Booked'[Cost, Reg.]) * MAX('Fee Factor'[Fee Factor]),
                  FILTER(
                         ALL('Project Hours Booked'),
                         'Project Hours Booked'[Date] <= MAX('Project Hours Booked'[Date]) &&
                         'Project Hours Booked'[Origin] = "TIME SHEET" &&
                         OR('Project Hours Booked'[Task] = "1000", OR('Project Hours Booked'[Task] = "1100", 'Project Hours Booked'[Task] = "1200"))
         )
)

 

 

Capture2.PNG

 

 

 

1 ACCEPTED SOLUTION

Hi @dan_yoxall,

Could you please share the incorrect screenshot for further analysis? Please create a slicer including [Task], and create your measure using the formula, check if it works fine.

Cumulative Spend to Date (Time Sheet) =
     CALCULATE(
            SUMX ( 'Project Hours Booked', 'Project Hours Booked'[Cost, Reg.]) * MAX('Fee Factor'[Fee Factor]),
                  FILTER(
                         ALLSELECTED('Project Hours Booked'),
                         'Project Hours Booked'[Date] <= MAX('Project Hours Booked'[Date]) &&
                         'Project Hours Booked'[Origin] = "TIME SHEET" 
         )
)


Please don't hesitate to ask if you have other issue.

Best Regards,
Angelia

View solution in original post

3 REPLIES 3
dan_yoxall
Helper I
Helper I

Realised the first paragraph doesn't make a whole lot of sense!!!  See below corrected version:  

 

The below is an snapshot of the first few of lines of data I am using to create a line graph of [Cost. Reg] against [Date] which is then filtered by [Origin] and [Task].

Hi @dan_yoxall,

Could you please share the incorrect screenshot for further analysis? Please create a slicer including [Task], and create your measure using the formula, check if it works fine.

Cumulative Spend to Date (Time Sheet) =
     CALCULATE(
            SUMX ( 'Project Hours Booked', 'Project Hours Booked'[Cost, Reg.]) * MAX('Fee Factor'[Fee Factor]),
                  FILTER(
                         ALLSELECTED('Project Hours Booked'),
                         'Project Hours Booked'[Date] <= MAX('Project Hours Booked'[Date]) &&
                         'Project Hours Booked'[Origin] = "TIME SHEET" 
         )
)


Please don't hesitate to ask if you have other issue.

Best Regards,
Angelia

View solution in original post

Hi Angelia

 

I used your amended formula with the ALLSELECT function and the slicer now works!

 

Thanks

Dan

 

Helpful resources

Announcements
MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

July 2021 Update 768x460.png

Check it out!

Click here to read more about the July 2021 Updates

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Urdu Hindi D365 Bootcamp 768x460.png

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Top Solution Authors
Top Kudoed Authors