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

Get Fabric certified for FREE! Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Dax Total incorrectly 0 (Currently using If with Text)

Good Morning, 

 

I currently have the below formula that brings through the correct figure when filtered by location (see below), however the total is 0 despite values being present, This is likely because I have embedded values with text. how do I sum the values and ignore the text (but also keep the text within the Matrix)?

 

 

Lost_Margin = 
var iFF=
IF('PED Tracker'[PED_Sales]/ [Gross_Sales] = 0 && 
                    [Gross_Sales]>0,[Gross_Sales]*[Avg_ped_pen]/1.2*0.72,
                    IF('PED Tracker'[PED_Sales]/ [Gross_Sales] = 0 && [Gross_Sales]<=0,"Dark",0))

                    Return iFF

 

 

AWF14978_0-1673950084263.png

Thank you for your help! 

 

Kind regards,

AF

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , You have change return like

 

Sumx(Values(Date[Month]), calculate(iFF) )

 

Check - https://www.youtube.com/watch?v=ufHOOLdi_jk

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

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , You have change return like

 

Sumx(Values(Date[Month]), calculate(iFF) )

 

Check - https://www.youtube.com/watch?v=ufHOOLdi_jk

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

Helpful resources

Announcements
Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.