Forum Discussion

Paolo_lito's avatar
Paolo_lito
Frequent Visitor
4 years ago
Solved

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

 

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
 

Can you please help me ? 

 

Thanks a lot 

 

 

 

  • Try 

    VAR Code = Your Code

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

    Return

    Result

4 Replies