Forum Discussion

JL83's avatar
JL83
Frequent Visitor
3 years ago
Solved

Calculating rowcount when column values are greater than or equal to selected slicer value

  I am trying to achieve a dynamic row count which is based on column values "Sold" being greater than or equal to a selected slicer value. The slicer is a static table using Generateseries (0,100,1...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi JL83 ,

    The following DAX might work for you:

    RowCount = 
    CALCULATE(
        COUNTROWS('UnitsSold'),
        FILTER(
            'UnitsSold',
            'UnitsSold'[Sold] >= MIN('T-Slicer'[Value])
        )
    )

    The slicer I create is just like this:

    Users can choose all integers between 0 and 100.
    And the final output is shown in the following figure:
    If I choose 4, there are 8 rows with Sold values greater than 4, so the value returns 8.

    Best Regards,

    Dino Tao

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.