Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
This is what I have.
Basically - you put in a date and it will tell you the yield for a specific line, component, whatever for the past 52 weeks and then for however many weeks have been completed past that date. The cards on the right are the correct summaries.
The charts work because I have a filter applied to them based on two measures (Yield Past and Yield Future)
What I am trying to do is use the Yield % PO - Past as a constant line in the bottom chart (future) as the baseline for improvement.
The problem I have is that the bottom chart is filtered by Yield Future =1 which is not allowing the constant line to have a value because it is allowing no dates.
How can I write a measure that will ignore the yield future filter (I tried CALCULATE with ALL but Yield Future can't be selected)?
Solved! Go to Solution.
@Rena
Problem:
Measures are not columns, when you use all(measures) it will not work.
Proposed Solution:
You can try to rewrite your baseline measure like this:
Baseline Past Yield =
CALCULATE(
[Yield % PO - Past],
REMOVEFILTERS('Date')
)
OR
Baseline Past Yield =
CALCULATE(
[Yield % PO - Past],
ALL('Date')
)
If this helps, ✓ Mark as Kudos | Mark as Solution| Help Others
Hi @Rena ,
Measures are not "filterable" in filter context like other fields. So, you cant really ignore it. since the visual is being filtered by dates your constant line measure needs to ignore the visual date context and compute the past baseline using the Start Date.
If I understand correctly you want this: On the Future chart (which is filtered to “future weeks”), you want a constant line equal to Yield % PO – Past (the “past 52 weeks baseline”), regardless of which week is on the x-axis.
I looked it up and found some helpful code:
Let us know how that works!
Proud to be a Datanaut!
Private message me for consulting or training needs.
Thanks for the input. I built the measure as stated above and placed it as the constant line in both charts.
Top chart is filtered to only show past dates
Bottom chart is filtered to only show future dates
The constant line becomes the values of the past or future.
I am thinking of adding a second date table and putting a synced slicer to it that is all white and at the back so it can't be changed but automatically matches the selected date and using it as I can't figure out why removing the filter isn't over-writing the filter
People smarter than me probably already knew that wouldn't work and why but I didn't. So I tried making a second date table and removing filters to the first date table, then I tried removing filters to the date column in the yield table I am using and both times I got the same result. When I use the measure as the constant line nothing shows up.
| User | Count |
|---|---|
| 58 | |
| 44 | |
| 32 | |
| 16 | |
| 14 |
| User | Count |
|---|---|
| 82 | |
| 66 | |
| 42 | |
| 27 | |
| 25 |