Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Download pbix: This is the report with close-to-original data + data model.
Goal: I want to filter values that appear in my Block slicer in a way that there are only the blocks that have more than one data point in the charts = have data for more than one calendar year within the range selected in slicer Year.
Example: Crop = Kiwifruit, Property = Alister, Block = Grey St, Year = 2018-2023 -> This one should not be visible in the Block slicer. At the same time, all the other slicers on the page should normally affect the Block slicer as well (that one is OK).
I wanted to use IF or SWITCH against a number of distinct years associated with each Block, then probably check that against a number of selected years in Year slicer. Unfortunately didn't get even close (see HasMultipleYears and Years in Samples).
I appreciate some help. I'm still new to all this, and learning 🙂
Solved! Go to Solution.
I solved that with this measure. I use the measure to filter the Block slicer (is greater than 1).
2DataPointsSoilBlock = COUNTROWS(
FILTER(
SUMMARIZE(
tblSoilDetail,
tblSoilDetail[Block],
tblSamples[Year]
),
[Block] <> BLANK() && [Year] <> BLANK()
)
)
I solved that with this measure. I use the measure to filter the Block slicer (is greater than 1).
2DataPointsSoilBlock = COUNTROWS(
FILTER(
SUMMARIZE(
tblSoilDetail,
tblSoilDetail[Block],
tblSamples[Year]
),
[Block] <> BLANK() && [Year] <> BLANK()
)
)
User | Count |
---|---|
73 | |
70 | |
38 | |
23 | |
23 |
User | Count |
---|---|
96 | |
94 | |
50 | |
42 | |
40 |