Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Ignore Filters from multiple tables in DAX

Hi,
I have a scenario to calculate "Current Month's Orders" whose values should be constant and not change when any filter/slicer from multiple tables is applied. I have four slicers from four different tables and one card visual displaying the "Current Month's Orders" value, If we filter any slicer the card visual value should not change. Can anyone help me to achieve this scenario?

I have created this calculated measure :

Current Month's Orders = CALCULATE(DISTINCTCOUNT('olap fact_Transaction'[order_id]),
FILTER(ALL('olap dim_Date'),[Current_YearMonth]="TRUE"))

 

ALL Function works for multiple columns from the same table.
But I have to Ignore Filters when applied from three other tables as well like shown in the screenshot below:

 

In one of the posts, the solution mentioned is to turn off the Edit Interaction of the three slicers with the card. For this to be done, select one slicer then go to the Format tab, click on Edit Interactions then turn it off, and do this for all three slicers.
But I do not see this option. Can someone pls show me the screenshot?
or how to achieve this in DAX?

  • Anonymous , Try like

     

    CALCULATE(DISTINCTCOUNT('olap fact_Transaction'[order_id]),
    FILTER(ALL('olap dim_Date'),[Current_YearMonth]="TRUE"),ALL('olap dim_TransactionType'),ALL('olap dim_Client'))

     

    CALCULATE(DISTINCTCOUNT('olap fact_Transaction'[order_id]),
    FILTER(ALL('olap dim_Date'),[Current_YearMonth]="TRUE"),ALL('olap dim_TransactionType'),ALL('olap fact_Transaction'),ALL('olap dim_Client'))

4 Replies

  • Anonymous , Try like

     

    CALCULATE(DISTINCTCOUNT('olap fact_Transaction'[order_id]),
    FILTER(ALL('olap dim_Date'),[Current_YearMonth]="TRUE"),ALL('olap dim_TransactionType'),ALL('olap dim_Client'))

     

    CALCULATE(DISTINCTCOUNT('olap fact_Transaction'[order_id]),
    FILTER(ALL('olap dim_Date'),[Current_YearMonth]="TRUE"),ALL('olap dim_TransactionType'),ALL('olap fact_Transaction'),ALL('olap dim_Client'))

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi amitchandak,

      This works, thanks a lot ðŸ˜Š . 

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi amitchandak ,

      Did you mean like this?

      Current Month's Orders = CALCULATE(DISTINCTCOUNT('olap fact_Transaction'[order_id]),
      FILTER(ALL(ALL('olap dim_Date'),ALL('olap dim_TransactionType'),ALL('olap fact_Transaction'),ALL('olap dim_Client')),[Current_YearMonth]="TRUE"))

      But I don't think it's the right syntax. Can you tell me the correct syntax?