Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
12 | |
2 | |
2 | |
1 | |
1 |
User | Count |
---|---|
20 | |
3 | |
2 | |
2 | |
2 |