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.
Trying to replicate this chart in power bi.
The rolling 12 month rate is a calculation of two columns in different tables. Counts of events divided by hours over same period.
I also have a date table DimDateOccured and place table with placecode, placename
Tables look like
details
DateOccured | Event | Placecode |
12/5/2016 | 0 | a |
11/6/2017 | 1 | a |
22/12/2016 | 1 | b |
3/1/2015 | 0 | c |
Hoursworked ( only one record each month for each place)
Date | hours | Placecode |
1/5/2016 | 50 | a |
1/6/2017 | 52 | a |
1/12/2016 | 40 | b |
1/1/2015 | 10 | c |
I have measures for rolling 12 months for hours and events,
Hours12M = CALCULATE (
SUM(HoursWorked[Hours]),
DATESBETWEEN (
DimDateOccured[date],
SAMEPERIODLASTYEAR ( NEXTDAY ( LASTDATE ( DimDateOccured[date] ) ) ),
LASTDATE ( DimDateOccured[date] )
)
)
and events12m which work for months or year.
Events12M = CALCULATE (
count(details[event]),
DATESBETWEEN (
DimDateOccured[date],
SAMEPERIODLASTYEAR ( NEXTDAY ( LASTDATE ( DimDateOccured[date] ) ) ),
LASTDATE ( DimDateOccured[date] )
)
)
How can I combine them on same graph?
What is the best way to limit the date range displayed to valid values as rolling 12 months works for next 12m as the values are correct but invalid without data.?
Hi ozhug,
To combine the two measure in a line-stack chart, just drag the measures to the value field. To modify the date range, you can use visual level filter to set the range for your chart.
Regards,
Jimmy Tao
hi jimmy,
the date range is both year for past years and month for the past 12month. how to you create a visual filter for this ?
thanks
Mark
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 |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |