Forum Discussion
dfox09
Helper III
4 years agoSet the default value for slicer to 0
Here is the DAX for a Slicer that I am using to show revenue amount based on a carrier selected. If no carrier is selected, ir shows the total value for all of the carriers. How do I get the default ...
- 4 years ago
Hi dfox09 ,
You can try this:-
measure = VAR result = CALCULATE ( MAXX ( 'FactRFP', [Total Annual Premium & FeesCURRENT] ), REMOVEFILTERS ( 'DimCarrier' ) ) RETURN COALESCE ( result, 0 ) --or you can try below --if(result = blank(),0,result) --or --result+0Thanks,
Samarth
Samarth_18
Community Champion
4 years agoHi dfox09 ,
You can try this:-
measure =
VAR result =
CALCULATE (
MAXX ( 'FactRFP', [Total Annual Premium & FeesCURRENT] ),
REMOVEFILTERS ( 'DimCarrier' )
)
RETURN
COALESCE ( result, 0 )
--or you can try below
--if(result = blank(),0,result)
--or
--result+0
Thanks,
Samarth
dfox09
Helper III
4 years agoI did have one other question, that I just noticed. The visual starts with no selection, hence the request to have the initial (default) value to 0. However, when I select a client, a list of competing carriers will show up and the value is supposed to reflect that of the incumbent carrier (that is, the carrier that the client currently uses). What is actually happening is that when I select a client, the list of carriers shows up but the value doesn't change from 0, like it should. That may reflect a coding issue in the initial measure. Could you check to see what would cause it not to reflect the incumbent carrier value?