Forum Discussion
Ignore a filter
HI,
I am working on stock report wherein I need to show different volume of stocks on two diffrent dates in one chart. For this purpose,
I fetched below mentioned columns from DB.
- I fetched "Quantiy" column twice and named those columns as "Quantity1" and "Quantity2"
- I fetched "Date" column twice and named those columns as "Date1" and "Date2"
I also created two measures with following formula:
- QuantityMeasure1 = CALCULATE(sum(Query1[Quantity1]),ALL(Query1[Date2]))
- QuantityMeasure2 = CALCULATE(sum(Query1[Quantity2]),ALL(Query1[Date1]))
Now I want the value of QuantityMeasure1 should only be dependent on Date1 and on the other hand, QuantityMeasure2 should only be dependent on Date2. But after any change in date slicer (Date1 and Date2), I get same value in both measures.
Note: I am using Direct mode to develope this report.
Please help .
Thanks in advance for all efforts.
3 Replies
- Greg_Deckler
Community Champion
Replace your ALL function with ALLEXCEPT if you want Measure1 to be tied only to Date1, then use Date1 in that measure instead of Date2 and vice versa.
- BI-lingualFrequent Visitor
Hi, can you please uplaod a sample data for more clarity?
As I understood from the description, you're using 2 quantity measure in single chart, split by same date axis, right?
Now, even if you have 2 separate date filters, but you still have a common x-axis date! Did I miss something here?
- AnonymousNot applicable
Thanks Greg_Deckler for sharing thoughts on this. Here is a screenshot of sample data in database.
To simplify this eqaution, I fetched below mentioned columns from DB.
- I fetched "Order Quantiy" column twice and named those columns as "Quantity1" and "Quantity2"
- I fetched "Order Date" column twice and named those columns as "Date1" and "Date2"
I also created two measures with following formula:
- QuantityMeasure1 = CALCULATE(sum(Query1[Quantity1]),ALL(Query1[Date2]))
- QuantityMeasure2 = CALCULATE(sum(Query1[Quantity2]),ALL(Query1[Date1]))
Thanks for looking into this.