Shruthika Katakam
Shruthika Katakam

Reputation: 11

Power bi - Use Slicer selection in filtering data

I am new to Power bi but i want to use Slicer(user selection) while filter data with comparison by 'Greater Than' instead of equal to.

I have data of devices with LastUpdated date column. and slicer with few list of dates for 15 days gap (calendar would be better but as it is not available yet sticking with dates list)

When user select a date in Slicer i want to filter the data whose Lastupdated Date is greater than equal to selected date. How to achieve this? tried columns,measures..

Any help is appreciated.

Upvotes: 1

Views: 3184

Answers (2)

kartik
kartik

Reputation: 168

I don't know about earlier , but now you can modify the date slicer to do as "after" the given date (you can do so by clicking on the icons present in the rightmost side of the slicer visual itself , wher you can select mode of slicer as between , after ,list , dropdown etc.)...which I believe means that you get all data for dates greater than the selected dates for the given column used in slicer which in your case will be LastUpdate.

Upvotes: 0

alejandro zuleta
alejandro zuleta

Reputation: 14108

I think you can create a measure that links the Date list table and the Device table, even if there is no relationship between them. However the measure must be present in your visualization otherwise the slicer will not affect it.

I've created a measure that calculates the maximum date for those rows which last update date is greater or equal than the slicer selection.

CalculatedLastUpdate =
CALCULATE (
    MAX ( DeviceTable[LastUpdate] ),
    FILTER (
        DeviceTable,
        DeviceTable[LastUpdate] >= MINX ( DateList, DateList[Date] )
    )
)

DateList - a table containing a column [Date] with you date range.
DeviceTable - a table containing device data.

enter image description here

Now you can delete LastUpdate column from your visualization in order to avoid two columns with the same data.

Let me know if it helps.

Upvotes: 1

Related Questions