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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Paolo_lito
Frequent Visitor

Zero instead Blank in a filter context

Hi ,

Hope you can help me on this subject .

I would like to have zero instead Blank in my Matrix  but only for the filtered value

 

Paolo_lito_0-1644513315789.png

If I add a Zero as suggested the most of the time then  the filters used in my measure seems be  broken and all non filtered are there .  see hereunder my dax measure .

CALCULATE (
SUM('Transaction'[Amount]),
   FILTER('Group Order','Group Order'[group_name] ="Conservation programs"),
   FILTER('SubGroup Order','SubGroup Order'[Subgroup_name] ="Programs Income"),
   FILTER('SubSection Order', 'SubSection Order'[subsection_name] IN {"Amazone & Guyanas","Congo basin","Great Rift        Lakes","Mekong"}),
FILTER(Project,Project[Project sub code] IN {"dgd phase 1","dgd phase 2"}) ,
FILTER(Scenario,Scenario[scenario type] ="Actual" || Scenario[scenario type] ="BF" )
) + 0
 
Paolo_lito_1-1644513631051.png

Can you please help me ? 

 

Thanks a lot 

 

 

 

1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Try 

VAR Code = Your Code

VAR Result = IF ( ISBLANK ( Code ), 0, Code )

Return

Result

View solution in original post

4 REPLIES 4
NanDeb
Helper I
Helper I

tamerj1
Super User
Super User

Try 

VAR Code = Your Code

VAR Result = IF ( ISBLANK ( Code ), 0, Code )

Return

Result

Paolo_lito
Frequent Visitor

@serpiva64  I tried but the result is the same . another Idea ?

serpiva64
Super User
Super User

Hi,

i have seen your measure with the zero at the end.

instead you can try without the ending zero but creating a new measure = the name of the basic measure +0

 

If this post isuseful to help you to solve your issue consider giving the post a thumbs up and accepting it as a solution !

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

November Carousel

Fabric Community Update - November 2024

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

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.