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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

How to make a sumx measure only filter when a slicer is selected?

Hello there, I have a measure that only provides one of two sums in a specific Deal, here it is below: 

DealPO =
SUMX (
VALUES ( 'Deals (CRM)'[Deal Name] ),
VAR _POTotal = [VO PO Total]
VAR _POBilled = [PO Billed]
RETURN
IF ( ISBLANK ( _POTotal ), _POBilled, _POTotal )
)
 
To put it short, this measure will choose which Sum is needed on a specific Deal, it works fine. However, I only want this measure to operate as soon as a user interacts with the [Deal Name] slicer below:

KyleAdam_0-1630522302713.png
 
Is there any way the DealPO measure can be altered so that it only works when the slicer above has been selected? I have tried implementing an IF ISFILTERED but it doesn't work but I'm not sure I'm doing it correctly. Any help would be appreciated. 
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hello @Anonymous I did actually manage to find a solution just recently, thanks to Amit in another thread. 

Here is the measure below that is used:


DealPO =
VAR _POTotal = [VO PO Total]
VAR _POBilled = [PO Billed]
RETURN
if( isfiltered('Deals (CRM)'[Deal Name]) ,
SUMX (
VALUES ( 'Deals (CRM)'[Deal Name] ),
IF ( ISBLANK ( _POTotal ), _POBilled, _POTotal )
) , _POBilled )

so now it will show a default [PO Billed] when a Deal isn't selected, rather than stay blank if a Deal isn't selected. That was the issue I had afterwards. Thank you guys. 


View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@Anonymous , Try like

 

DealPO =
VAR _POTotal = [VO PO Total]
VAR _POBilled = [PO Billed]
RETURN
if( isfiltered('Deals (CRM)'[Deal Name]) ,
SUMX (
VALUES ( 'Deals (CRM)'[Deal Name] ),
IF ( ISBLANK ( _POTotal ), _POBilled, _POTotal )
) , blank())

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi @amitchandak 

I'm not sure why but that's showing up a blank value on my card for [PO Billed] when a Deal isn't selected. 

Why do you think that is?

Anonymous
Not applicable

Hi @Anonymous ,

Do you want to implement the DealPO value to be displayed only when the Deal Name slicer has the options selected. If the slicer doesn't have any value selected, it won't be displayed. Do I understand correctly? If not, could you please explain the result you want with specific sample and relevant screenshots. Thank you.

yingyinr_0-1631095528877.png

In addition, could you share with us the formulas for the two measures [VO PO Total] and [PO Billed] and the sample data of the table involved in the visual in order to provide you with a suitable solution? Thank you.

Best Regards

Anonymous
Not applicable

Hello @Anonymous I did actually manage to find a solution just recently, thanks to Amit in another thread. 

Here is the measure below that is used:


DealPO =
VAR _POTotal = [VO PO Total]
VAR _POBilled = [PO Billed]
RETURN
if( isfiltered('Deals (CRM)'[Deal Name]) ,
SUMX (
VALUES ( 'Deals (CRM)'[Deal Name] ),
IF ( ISBLANK ( _POTotal ), _POBilled, _POTotal )
) , _POBilled )

so now it will show a default [PO Billed] when a Deal isn't selected, rather than stay blank if a Deal isn't selected. That was the issue I had afterwards. Thank you guys. 


Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors