cancel
Showing results for 
Search instead for 
Did you mean: 
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
Exciting changes

Power BI Community Changes

Check out the changes to the Power BI Community announced at Build.

May 2023 update

Power BI May 2023 Update

Find out more about the May 2023 update.

Kudo Data Story carousel

Data Stories Gallery

Visit our Data Stories Gallery and give kudos to your favorite Data Stories.

Top Solution Authors