Forum Discussion
Using two smart filters
- 8 years ago
check out this thread
https://community.powerbi.com/t5/Desktop/or-logic-slicer/m-p/460738
solution I posted there involves creating new tables, but there is also link to SQLBI article on the matter
https://www.sqlbi.com/articles/using-or-conditions-between-slicers-in-dax/
Thanks for the reply, unfortunately I can not share the data as it is company informtation.
Yes, NonSelectedPersons shows the gross profit of the firm as a whole, not highlighting any particular person, it should be named allpersons, apologies.
TLDESC is the description of transaction lines. When filtered to one off expenses using the specific filter, it should add this to the total gross profit (to help with forecasts as these events are one off and can be ignored). It should add this to the gross profit value if it is entered in the filter, regardless of whether a selected person has been filtered in.
Currently, the gross profit value is = NonSelectedPersons when both the person and specific filter are used.
For reference, the One off Expenses code is as follows:
One Off Expenses =
VAR ConsultantExpenses = CALCULATE(SUM(Append1[-Formula5]),FILTER(Append1,Append1[TLNOMCOD]=80000),ALL(Append1[Person]))
VAR AssociateExpenses = CALCULATE(SUM(Append1[-Formula5]),FILTER(Append1,Append1[TLNOMCOD]=80250),ALL(Append1[Person]))
VAR ConsultantRechargedExpenses = CALCULATE(SUM(Append1[-Formula5]),FILTER(Append1,Append1[TLNOMCOD]=70050),ALL(Append1[Person]))
VAR AssociateRechargedExpenses = CALCULATE(SUM(Append1[-Formula5]),FILTER(Append1,Append1[TLNOMCOD]=70250),ALL(Append1[Person]))
VAR SelectedExpenses = CALCULATE(-[Unchargeable expenses],ALLSELECTED(Append1[TLDESC ]),ALL(Append1[Person]))
RETURN
SelectedExpenses
when I ask for the table I really need the structure - can you copy say top10 rows with anonymized data when necessary?