Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I have two measures created.
2DataPointsSoilBlock = COUNTROWS(
FILTER(
SUMMARIZE(
tblSoilDetail,
tblSoilDetail[Block],
tblSamples[Year]
),
[Block] <> BLANK() && [Year] <> BLANK()
)
)
SampleCurrentYear = IF(YEAR('tblSamples'[Date]) = YEAR(TODAY()), "Yes", "No")
I need to "pre-filter" Block slicer. The first measure if set "greater than 1" hides Blocks with less than 2 data points (data for only 1 calendar year). The second measure if set "yes" hides Blocks that has no data for current year. All works fine when I use one of these measures at a time, but they break each other if used together.
Is there any way of merging them or walkaround?
Solved! Go to Solution.
I don't know how to make both measures work at the same time but I have found another solution.
As a replacement for the second measure (checking for this year) I a new query in Query Editor merging tables tblSoilDetail and tblSamples, and kept there only Block from the first and the Date from the latter. Erased all empty rows, duplicates, and filtered Date column to be this year.
After that I created a measure below and used it to pre-filter Block slicer by setting the ControlSoilBlock is not blank.
ControlSoilBlock = var _tab = SUMMARIZE(ALLSELECTED(FilterSoil), FilterSoil[Block])
return
COUNTROWS(FILTER(tblSoilDetail, tblSoilDetail[Block] in _tab))
I don't know how to make both measures work at the same time but I have found another solution.
As a replacement for the second measure (checking for this year) I a new query in Query Editor merging tables tblSoilDetail and tblSamples, and kept there only Block from the first and the Date from the latter. Erased all empty rows, duplicates, and filtered Date column to be this year.
After that I created a measure below and used it to pre-filter Block slicer by setting the ControlSoilBlock is not blank.
ControlSoilBlock = var _tab = SUMMARIZE(ALLSELECTED(FilterSoil), FilterSoil[Block])
return
COUNTROWS(FILTER(tblSoilDetail, tblSoilDetail[Block] in _tab))
User | Count |
---|---|
117 | |
73 | |
58 | |
49 | |
48 |
User | Count |
---|---|
171 | |
122 | |
60 | |
59 | |
56 |