Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
vini_udenia
Helper I
Helper I

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).

 

vini_udenia_0-1670916579053.png

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.
vini_udenia_3-1670917012347.png

 

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:
vini_udenia_4-1670917149351.png

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

vini_udenia_5-1670917202515.png

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

1 REPLY 1
v-yinliw-msft
Community Support
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.

 

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.