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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
sagarpsali
New Member

Page level or report level filter

Hi All, I am facing one issue. Year and state as my main driver/field/column, but when nothing is selected, in report, graphs showing some values, don't know which values it is taking.

 

I have to implement a scenario, if year and state is not selected, then none will show in to the report. And once selected year and then either state, it need to show graph/chart, related to those value.

 

How I can implement this? Can someone help me.

6 REPLIES 6
greggyb
Resident Rockstar
Resident Rockstar

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.

 

 

Capture.PNG

 

Yes, you will have to create explicit measure to be used in each visual.

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.

 

@sagarpsali, I'm unclear on your requirement now. Do you want to enforce exactly 1 year and >=1 state?

Hi,
My requirements is like if at least year and one state should be selected then only it will show graph. So there are chances that user can select one year or more and same for state. But need here is, to show some graph, user has to select at least one year and one state. Now what is happening, even if there is nothing selected either year or state, graph/report considering all input and showing the result.
Here one more question to me, when report will load, either by default all values from year and state should preselected and then user can decide which to select. If u see the diagram which I uploaded, it has select all option is there for states, if user click that "Select All" states get deselected. And even though, graph showing value. So when nothing is selected from state or year , none will appear on report. As soon as user will select at least one year and state, it should refect in graph.
I hope u understand my question.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.