Forum Discussion
Page level or report level filter
Wrap all your base measures in the following:
// DAX
// Measure template
MyNewMeasure =
IF(
HASONEVALUE( 'DimDate'[Year] )
&& HASONEVALUE( 'DimGeography'[State] )
,<your old measure definition here>
,BLANK()
)You're checking for the existence of exactly one unique value for each of [Year] and [State]. When this is the case, you evaluate the regular measure expression. When there is more than one unique value for either or both of [Year] and [State], then it returns BLANK().
If you see below image, in that case I have to create a new column for everytime when I will create a some chart or graph and have to add that code, is that so? Year and State selection is either one or more. but my requirement is like, is nothing selected then, nothing will show on graph, all graph or charts should blank, so once year and state selected, it will start populating the value.
- greggyb10 years agoResident Rockstar
Yes, you will have to create explicit measure to be used in each visual.
- sagarpsali10 years agoNew Member
Hi Greg,
thanks for replying, but i am not looking only one selection, I am looking atleast one selection. When I created a new column with given code, but when i m going to the report, value is not populating in that, it is remaining blank, even if i select year and any state.
- greggyb10 years agoResident Rockstar
sagarpsali, I'm unclear on your requirement now. Do you want to enforce exactly 1 year and >=1 state?