Forum Discussion

vini_udenia's avatar
vini_udenia
Helper I
3 years ago

Filtering visual based on calculated measure

Hi, I have the requirement to display:

1. schools who have only opted for a specific subject (Personal Project)

2. display all schools not in Graph 1 (opted for Personal project and other subjects). To identify this I have created indicators and to handle Graph 2 created a calculated measure which sums up the indicator at school level (last column below).

 

DAX used for the sum of Not PP Ind 1

Sum of Not PP Ind1 =
CALCULATE(sum([Not Personal Proj Ind]), all('TBL_DM_FCT_SUB_COMP'), 'TBL_DM_FCT_SUB_COMP'[SK_SCH] = SELECTEDVALUE('TBL_DM_FCT_SUB_COMP'[SK_SCH]) && 'TBL_DM_FCT_SUB_COMP'[TXT_PROG] = SELECTEDVALUE('TBL_DM_FCT_SUB_COMP'[TXT_PROG]) && 'TBL_DM_FCT_SUB_COMP'[Session] = SELECTEDVALUE('TBL_DM_FCT_SUB_COMP'[Session])  )
 
The filter on indicator (is not 0) works when I display data at All School or school level.

 

But when I perform the breakdown for subjects (not within a school) the data is not returned as expected. I suspect it is because the calculated measure is not defined to return the value at Subject level.  
Expected:

What is returned on applying filter Sum of Not PP Ind1 is not 0

I have been struggling for the past couple of days, any help on this will be appreciated. Thanks!

1 Reply

  • v-yinliw-msft's avatar
    v-yinliw-msft
    Community Support

    Hi vini_udenia ,

     

    Seeing that you used the selectedvalue function in your formula, could you please try to add some slicers?

    And then you can select the value what you want.

     

    Hope these help you.

     

    Best Regards,

    Community Support Team _Yinliw

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