Forum Discussion
DAX help
- 7 years ago
Hey dilumd,
understand! With your current data model (just one table) this will become a nightmare, for this reason I recommend to adjust your datamodel to this
I set the Cross filter direction between table1 and "Category2", because category2 seems less important to me than category1, maybe I err. But this allows that the content of the slicer for "Category 2" based on the coresponding table, namely "Category 2" reacts to selections of the slicer Category 1
Category1 --> Table1 <--> Category2
I created the tables Category 1 and Category 2, using these simple DAX statemens, e.g. Category 1:Category 1 = VALUES(Table1[Category1])
Then I created a measure like so:
Quantity_T = CALCULATE( SUM(Table1[Qty]) ,ALL('Category 2'[Category2]) )This results to this report - please be aware that the content of the Category slicers is coming from the category tables:
Hopefully this is what you are looking for, or at least gives an idea, of course the new measure returns 19, if nothing from Category 1 is selected :-)
Regards,
Tom
Hi Zubair_Muhammad,
Quantity_M = CALCULATE ( SUM ( Test_Table[Qty] ), ALL ( Test_Table[Category2] ) )
This function works very similar to my previous all except function. But whenever I add a filter on date that behavior breaks and then it’s getting filtered on category2 as well.
As far as I’m not adding any filter on dates this works but as soon as filter comes on date whole thing breaks and start filtering on category2.
Hope I explain you this now.
Thanks a lot.
I get your point.
I think the only way is to use Diable interaction between visuals because slicer selection will filter the rows of other visuals irrespective of the MEASURE we write.
But may be i am missing something.
Could you help