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.
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
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 |
---|---|
110 | |
95 | |
76 | |
65 | |
51 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |