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
Anonymous
Not applicable

Calculation for all but the selected filter value

I'm new to DAX and still learning Power BI. I would like a calculation that filters all but the selected value in a slicer.  In example (this code does not work):

 

cal_all_but_isem_gr_fa16_fa17_ret_rate =
CALCULATE(SUM(hu_ir_enrollment_retention_graduation[gr_fall16_fall17_ret]),
(FILTER(hu_ir_enrollment_retention_graduation),hu_ir_enrollment_retention_graduation[stu_div] = "GR" && NOT (SELECTEDVALUE)/
CALCULATE(SUM(hu_ir_enrollment_retention_graduation[gr_fall_2016_cohort]),
(FILTER(hu_ir_enrollment_retention_graduation),hu_ir_enrollment_retention_graduation[stu_div] = "GR" && NOT (SELECTEDVALUE)))
 
What is the best way to accomplish this? Please advise. Thank you.
 
 
 
 
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

Refer

Sum Not Selected = CALCULATE(sum(Sales[Sales]),EXCEPT(ALL(Customer[Age Group]),ALLSELECTED(Customer[Age Group])))

Try

 CALCULATE(sum(hu_ir_enrollment_retention_graduation[gr_fall_2016_cohort]),EXCEPT(ALL(hu_ir_enrollment_retention_graduation[stu_div]),ALLSELECTED(hu_ir_enrollment_retention_graduation[stu_div])))

 

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

Refer

Sum Not Selected = CALCULATE(sum(Sales[Sales]),EXCEPT(ALL(Customer[Age Group]),ALLSELECTED(Customer[Age Group])))

Try

 CALCULATE(sum(hu_ir_enrollment_retention_graduation[gr_fall_2016_cohort]),EXCEPT(ALL(hu_ir_enrollment_retention_graduation[stu_div]),ALLSELECTED(hu_ir_enrollment_retention_graduation[stu_div])))

 

Anonymous
Not applicable

Thank You. This formula is what I needed. Smiley Happy

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.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.