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

Formula not display correct result

Hi,

Please see below formula,It gives me the correct result but result display is not correct.

When below forumla condition does not meet it should display 0 in a current d rows but it is showing totally empty rows.CURRENT D column data type is decimal with currency format.

CURRENT D = IFERROR(CALCULATE(AVERAGE('MS'[Valid Price]),

                     FILTER(ALL('MS '[REGION]),'MS '[REGION]="AMERICAS"),

                     FILTER('MS ','MS '[Unique ]=RELATED('MS  Supporting Column'[Pricing Id])),

                     FILTER('MS ','MS '[Contract Star]="Y"),

                     FILTER('MS ','MS '[Contract End]="N")),0)

community.png

1 ACCEPTED SOLUTION
TomMartens
Super User
Super User

Hey,
I'm not sure, what kind of error you try to catch, AVERAGE(..., ...) returns BLANK() if the application of the filter from the CALCULATE filter out all rows in the current FILTER context.

 

Maybe you should give ISBLANK() a try like so:

var thevalue = CALCULATE(<your CALCULATE(...)>)
return
IF(ISBLANK(thevalue), 0, thevalue)

If this does not help, maybe you can provide a pbix file with some sample data, upload the pbix to onedrive or dropbox and share the link.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

View solution in original post

3 REPLIES 3
TomMartens
Super User
Super User

Hey,
I'm not sure, what kind of error you try to catch, AVERAGE(..., ...) returns BLANK() if the application of the filter from the CALCULATE filter out all rows in the current FILTER context.

 

Maybe you should give ISBLANK() a try like so:

var thevalue = CALCULATE(<your CALCULATE(...)>)
return
IF(ISBLANK(thevalue), 0, thevalue)

If this does not help, maybe you can provide a pbix file with some sample data, upload the pbix to onedrive or dropbox and share the link.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany
Anonymous
Not applicable

Hi Tom,

Thank you so much it is working pefectly fine .

You can see the result below.

tom.png

Perfect!


Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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