Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hello,
I'm planning to set up a summary chart, where in Summary Value should be presented by either Date Range Selection or Year selection.
The chart should display values only if any of the slicer selected(like in the screenshot2), And should be Set to Blank(unlike in screenshot 1) if both the slicers selected..
Can we do this?
Thanks.
If you want to show blank in your visual before any items were selected in your slicers. You could create another date table, use the date and year on your slicer. And then create a measure in your original table.
Measure 2 = VAR selectedyear = MAX ( 'Table'[Year] ) VAR selectedmindate = MIN ( 'Table'[Date] ) VAR selectedmaxdate = MAX ( 'Table'[Date] ) RETURN IF ( ISFILTERED ( 'Table'[Year] ) || ISFILTERED ( 'Table'[Date] ), IF ( MAX ( Sales[Year] ) = selectedyear && ( MAX ( Sales[Date] ) >= selectedmindate && MAX ( Sales[Date] ) <= selectedmaxdate ), 1, 0 ), 0 )
Use this measure in your visual filter.
Regards,
Charlie Liao
Hello @v-caliao-msft ,
Thanks for the reply..
The model you've suggested also have the simmilar problem I'm facing.
As I mentioned in my earlier post, the output value should be NULL/BLANK if we select both the slicers. We should have the value only if either of the slicers selected not the both.
Please try the DAX below.
Measure 2 = VAR selectedyear = MAX ( 'Table'[Year] ) VAR selectedmindate = MIN ( 'Table'[Date] ) VAR selectedmaxdate = MAX ( 'Table'[Date] ) RETURN IF ( ( ( ISFILTERED ( 'Table'[Year] ) && ISFILTERED ( 'Table'[Date] ) ) = TRUE () ) || ( ( ISFILTERED ( 'Table'[Year] ) || ISFILTERED ( 'Table'[Date] ) ) = FALSE () ), 0, IF ( ISFILTERED ( 'Table'[Year] ) = TRUE () && ISFILTERED ( 'Table'[Date] ) = FALSE () && MAX ( Sales[Year] ) = selectedyear, 1, IF ( ISFILTERED ( 'Table'[Year] ) = FALSE () && ISFILTERED ( 'Table'[Date] ) = TRUE () && MAX ( Sales[Date] ) >= selectedmindate && MAX ( Sales[Date] ) <= selectedmaxdate, 1, 0 ) ) )
Regards,
Charlie Liao
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
81 | |
75 | |
60 | |
37 | |
33 |
User | Count |
---|---|
102 | |
56 | |
52 | |
46 | |
40 |