This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
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.
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.
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?
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |