The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi,
I have a question I am hoping someone can answer. Basically I have a table that has a date for each record. There are not records for each date. For instance, there may be a record on 3/1/2021 and 4/13/2021, but those are the only ones. I have a slicer that utilizes this date as the filter. The problem comes that I am trying to analyze some numbers, but I need to calculate the number of minutes in the date slicer. For instance, if the date range selected is 4/1/2021 - 4/30/2021, I need the number of minutes between those two dates. Is there any way to do this?
[Num of Mins] =
var MinDate = MIN( Slicer[Date] )
var MaxDate = MAX( Slicer[Date] )
var MinCount =
( MaxDate - MinDate ) // num of days
* 24 // num of hours in a day
* 60 // num of mins in an hour
return
MinCount
Thanks. My issue is that I don't know the DAX to get "Slicer[Date]" since "Slicer" isn't recognized.
Since you have not given us any clue about your tables and their names... well, I used a generic name. You should now adjust it to your model.
Well, say I have a field for "Date of Incident". That may only have a few days in it. For instance one issue on 4/5/2021. The slicer might be looking from 3/15/2021 to 5/31/2021. If I do Max or Min on the Date of Incident, I will get 4/5 instead of the beginning or ending date in the slicer. I'm trying to target the actual date range in the slicer, not the records.
User | Count |
---|---|
28 | |
11 | |
8 | |
6 | |
5 |
User | Count |
---|---|
35 | |
14 | |
12 | |
9 | |
7 |