Forum Discussion

JacobMotu's avatar
JacobMotu
Frequent Visitor
3 years ago
Solved

How to use two measures for filtering without breaking each other

My pbix file.   I have two measures created.   2DataPointsSoilBlock = COUNTROWS( FILTER( SUMMARIZE( tblSoilDetail, tblSoilDetail[Block], tblSamples[Year] ), [...
  • JacobMotu's avatar
    3 years ago

    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))