Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have 1 table with the data under. And i want to create a line chart that shows, date and how much sent vs opened. Both of them have their own datetime. So i want to se how much that where sent today vs opened. If i select one of the date it gets messy, it will group by the days that it was sent.
Sendt | Sendt_dt | Opened | Opened_dt |
1 | 2015-03-06 11:49:57.750 | 1 | 2015-04-06 11:49:57.750 |
send Date = [Sendt_dt].date
Open Date = [Opened_dt].date
Join both these dates with date table and one will inactive realtion. Use the inactive one in measure using userelation
Example
@mathician Seems like you would need a disconnected date table and then you could do something like:
Measure Sent =
VAR __Date = MAX('Date'[Date])
RETURN
COUNTROWS('Table',DATE(YEAR('Table'[SendtSendt_dt]),MONTH('Table'[SendtSendt_dt]),DAY('Table'[SendtSendt_dt])) = __Date)
Measure Opened =
VAR __Date = MAX('Date'[Date])
RETURN
COUNTROWS('Table',DATE(YEAR('Table'[OpenedOpened_dt]),MONTH('Table'[OpenedOpened_dt]),DAY('Table'[OpenedOpened_dt])) = __Date)
How do i use my date coloumns, since powerbi just lets me use measure in this situation. Just i explained above.
Dosent seem like to work. When i add my table name and column name in "the place that i marked red" only measure coulmns apear, i dont get the options to add my date coulmns.
MAX('Date'[Date]) RETURN COUNTROWS('Table',DATE(YEAR('Table'[SendtSendt_dt]),
hi @mathician
Just miss a "FILTER" in the formula
Measure Sent =
VAR __Date = MAX('Date'[Date])
RETURN
COUNTROWS(FILTER('Table',DATE(YEAR('Table'[SendtSendt_dt]),MONTH('Table'[SendtSendt_dt]),DAY('Table'[SendtSendt_dt])) = __Date))
Measure Opened =
VAR __Date = MAX('Date'[Date])
RETURN
COUNTROWS(FILTER('Table',DATE(YEAR('Table'[OpenedOpened_dt]),MONTH('Table'[OpenedOpened_dt]),DAY('Table'[OpenedOpened_dt])) = __Date))
Measure Opened =
VAR __Date = MAX('Date'[Date])
RETURN
COUNTROWS(FILTER('Table',DATE(YEAR('Table'[OpenedOpened_dt]),MONTH('Table'[OpenedOpened_dt]),DAY('Table'[OpenedOpened_dt])) = __Date))
Regards,
Lin
My date table is a normal CalenderAuto table. But my fact table has the value bellow "2020-09-09 22:32:57.000"
What coulmns should my datetable have? for it to be joinable. Because its not joining right now.
hi @mathician
This work on my side, here is sample pbix file, please try it.
and could you please share your sample pbix file and expected output, that will be a great help.
Regards,
Lin
Returns Null on both values.
Proud to be a Super User!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
82 | |
66 | |
58 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |