Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
9 years ago
Solved

DAX ALL Formula Ignored

Hello,
I'm having troubles with 2 Visuals not behaving like I thought they would ...
My measure is defined as
Total_Slice_Sec_NoStationType_NoEvtType = CALCULATE(SUM('v2 F_EVENTS_BY_SLICE'[Slice Sec]), ALL('v2 DIM_TVM'))
When I normally display it works fine and behaves like I thought.
But when I select the a field from v2_DIM_TVM in the top Visual the below Visuals accts correctly and shows only the Type-1 (There is a filter relationship), but my DAX formula also applies that filter ...

 

I Supose i'm mistaking somewhere, but at this moment I wouln't know where ....


  • Anonymous wrote:

    Hello,
    I'm having troubles with 2 Visuals not behaving like I thought they would ...
    My measure is defined as
    Total_Slice_Sec_NoStationType_NoEvtType = CALCULATE(SUM('v2 F_EVENTS_BY_SLICE'[Slice Sec]), ALL('v2 DIM_TVM'))
    When I normally display it works fine and behaves like I thought.
    But when I select the a field from v2_DIM_TVM in the top Visual the below Visuals accts correctly and shows only the Type-1 (There is a filter relationship), but my DAX formula also applies that filter ...

     

    I Supose i'm mistaking somewhere, but at this moment I wouln't know where ....


    Anonymous

    What table does the Type column belong to? I see two tables in the measure, what is the relationship?

    It appears that you need an extra ALLEXCEPT in the filter.

     

    Total_Slice_Sec_NoStationType_NoEvtType =
    CALCULATE (
        SUM ( 'v2 F_EVENTS_BY_SLICE'[Slice Sec] ),
        ALL ( 'v2 DIM_TVM' ),
        ALLEXCEPT ( 'v2 F_EVENTS_BY_SLICE', 'v2 F_EVENTS_BY_SLICE'[SLICE_DAY_IN_MONTH] )
    )

     

    It would be easier to find out the problem if you can share a sample pbix. 

2 Replies

  • Eric_Zhang's avatar
    Eric_Zhang
    Microsoft Employee

    Anonymous wrote:

    Hello,
    I'm having troubles with 2 Visuals not behaving like I thought they would ...
    My measure is defined as
    Total_Slice_Sec_NoStationType_NoEvtType = CALCULATE(SUM('v2 F_EVENTS_BY_SLICE'[Slice Sec]), ALL('v2 DIM_TVM'))
    When I normally display it works fine and behaves like I thought.
    But when I select the a field from v2_DIM_TVM in the top Visual the below Visuals accts correctly and shows only the Type-1 (There is a filter relationship), but my DAX formula also applies that filter ...

     

    I Supose i'm mistaking somewhere, but at this moment I wouln't know where ....


    Anonymous

    What table does the Type column belong to? I see two tables in the measure, what is the relationship?

    It appears that you need an extra ALLEXCEPT in the filter.

     

    Total_Slice_Sec_NoStationType_NoEvtType =
    CALCULATE (
        SUM ( 'v2 F_EVENTS_BY_SLICE'[Slice Sec] ),
        ALL ( 'v2 DIM_TVM' ),
        ALLEXCEPT ( 'v2 F_EVENTS_BY_SLICE', 'v2 F_EVENTS_BY_SLICE'[SLICE_DAY_IN_MONTH] )
    )

     

    It would be easier to find out the problem if you can share a sample pbix. 

  • rajeshtauro's avatar
    rajeshtauro
    Frequent Visitor

    i am attaching screenshot in which i want display values in the dax function greater then 

    selected filter date 
    but filter is applied is or before in short i want show 300 because date in dec 2020 but my filter is or before may 2020 how do this in dax function