Forum Discussion
Creating Trend graphs for Weekly Data
- Anonymous6 years ago
Hi Anonymous,
You can check the following steps if they suitable for your requirements.
Steps:
1. Create a expand table based on id and its date ranges.
Expand = SELECTCOLUMNS ( FILTER ( CROSSJOIN ( Test, CALENDAR ( MIN ( Test[Creation Date] ), MAX ( Test[Last Modified] ) ) ), [Date] >= [Creation Date] && [Date] <= [Last Modified] ), "ID", [ID], "Date", [Date] )2. Build a relationship from expand table to original table based on id field with 'both' direction mode.
3. Create a line chart with expand table date as axis, original table 'status' as legend and 'id' as value. (If you need a trend line, you can enable it in the analysis panel trend option.)
4. Create a slicer with status fields to choose display records.
Snapshot:
BTW, I also attached the sample file below.
Regards,
Xiaoxin Sheng
You can create measures like this
calculate(count(table[ID]))
calculate(count(table[ID]), table[status] in {"Fixed", "Reject", "Deferred", "Retest"})
For week like this week , last week and calendar for week wise refer : https://www.dropbox.com/s/d9898a48e76wmvl/sales_analytics_weekWise.pbix?dl=0
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/