Forum Discussion

RatanBhushan_05's avatar
3 years ago
Solved

How to ignore slicers from same table while creating mesaure?

https://www.dropbox.com/scl/fi/r1e4bnsf3d6xz6icxxi2i/TestFile.pbix?rlkey=8q62cq8arlz976ysuz3q4xcov&dl=0 

Hi Team

 

I am trying to create 3 meaures - 

Measure 1 in which user can see sum of values on the basis of selection month_modified_1
Measure 2 in which user can see sum of values on the basis of selection month_modified_2

Measure 3 in which user can see variance between measure1 and measure2

 

The problem which I am facing I have 2 slicers of month_modified_1 and month_modified_2 - both must have same month selected only then it is showing data otherwise not - the whole purpose of keeping these 2 columns are going in vain as I want to give user to select a month in both slicers to ignore each other and show respective sum of the values and variance. 

 

 

I have tried below and many ways of dax but nothing is working

ValueModified1 =
CALCULATE(SUM(WandoFullDataExtract[Value]),
KEEPFILTERS(
    FILTER(
        ALL(WandoFullDataExtract[Month_Modified_1],
            WandoFullDataExtract[Month_Modified_2]),
        WandoFullDataExtract[Month_Modified_1]=SELECTEDVALUE(WandoFullDataExtract[Month_Modified_1]))))
 

 

 

Please help as I am unable to upload the file here?

  • Hi, RatanBhushan_05 

     

    You can try the following methods to create a new date table.

    Date = VALUES(Sheet1[Month_Modified_2])

    Measure 1 = SUM(Sheet1[Value])
    Measure 2 = 
    CALCULATE ( SUM ( Sheet1[Value] ),
        FILTER ( ALLEXCEPT ( Sheet1, Sheet1[Attribute] ),
            [Month_Modified_2] = SELECTEDVALUE ( 'Date'[Month_Modified_2] )
        )
    )
    Difference = [Measure 2]-[Measure 1]

    Is this the result you expect?

     

    Best Regards,

    Community Support Team _Charlotte

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

1 Reply

  • v-zhangti's avatar
    v-zhangti
    Icon for Community Support rankCommunity Support

    Hi, RatanBhushan_05 

     

    You can try the following methods to create a new date table.

    Date = VALUES(Sheet1[Month_Modified_2])

    Measure 1 = SUM(Sheet1[Value])
    Measure 2 = 
    CALCULATE ( SUM ( Sheet1[Value] ),
        FILTER ( ALLEXCEPT ( Sheet1, Sheet1[Attribute] ),
            [Month_Modified_2] = SELECTEDVALUE ( 'Date'[Month_Modified_2] )
        )
    )
    Difference = [Measure 2]-[Measure 1]

    Is this the result you expect?

     

    Best Regards,

    Community Support Team _Charlotte

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.