Forum Discussion
Timeline chart view Date when timestamp is empty
Hi AgoZ_KH ,
I just use the simplest "Line chart" as an example.
And I don't find the visual "Graph Line" you are using.
In addition, which field do you use as "X axis"? Could you create a sample file for test? Please don't contain any sensitive information.
Reference: How to provide sample data in the Power BI Forum - Microsoft Power BI Community
Best Regards,
Icey
Hi Icey!
the chart is the same.
Here as requested an example of my report and data model (simplificated):
https://www.dropbox.com/s/7j53vb4cl2na467/report_example_agoz.pbix?dl=0
Note that between the 4th and 9th february I have no data. My goal is to show this days (of cours with 0 data).
Hope this clarify my issue.
Best regards
AgoZ
- Icey4 years agoCommunity Support
Hi AgoZ_KH ,
In your scenario, it is needed to create a calendar table like so:
Calendar = ADDCOLUMNS ( CALENDARAUTO (), "Week", WEEKNUM ( [Date], 2 ) )Then create a Date column in your data table:
operation_date = [operation_timestamp].[Date]Next step is to create a relationship between the two tables:
Then we can create measure to add "+0" to meet your requirements:
Max = MAX ( last_six_month_history[Measure A] ) + 0Min = MIN ( last_six_month_history[Measure A] ) + 0Med = AVERAGE ( last_six_month_history[Measure A] ) + 0Use "Date" and "Week" column from "Calendar" table and here is the result
We can find that, there is also data before 2022/1/9. To prevent it, modify the measures like so:
Modified - Max = VAR MaxDate_ = CALCULATE ( MAX ( last_six_month_history[operation_date] ), ALLSELECTED ( 'Calendar' ) ) VAR MinDate_ = CALCULATE ( MIN ( last_six_month_history[operation_date] ), ALLSELECTED ( 'Calendar' ) ) VAR CurDate_ = MAX ( 'Calendar'[Date] ) RETURN IF ( CurDate_ >= MinDate_ && CurDate_ <= MaxDate_, MAX ( last_six_month_history[Measure A] ) + 0 )Modified - Min = VAR MaxDate_ = CALCULATE ( MAX ( last_six_month_history[operation_date] ), ALLSELECTED ( 'Calendar' ) ) VAR MinDate_ = CALCULATE ( MIN ( last_six_month_history[operation_date] ), ALLSELECTED ( 'Calendar' ) ) VAR CurDate_ = MAX ( 'Calendar'[Date] ) RETURN IF ( CurDate_ >= MinDate_ && CurDate_ <= MaxDate_, MIN ( last_six_month_history[Measure A] ) + 0 )Modified - Med = VAR MaxDate_ = CALCULATE ( MAX ( last_six_month_history[operation_date] ), ALLSELECTED ( 'Calendar' ) ) VAR MinDate_ = CALCULATE ( MIN ( last_six_month_history[operation_date] ), ALLSELECTED ( 'Calendar' ) ) VAR CurDate_ = MAX ( 'Calendar'[Date] ) RETURN IF ( CurDate_ >= MinDate_ && CurDate_ <= MaxDate_, AVERAGE ( last_six_month_history[Measure A] ) + 0 )And the result is below:
For more details, please check the attached .pbix file.
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.