Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago

Display missing day also in line chart

Hi Experts, 
i have the req where i need to missing day column data also as we don't have day in for 21st and 23rd however we need to show 21st and 23rd in line chart ..is it possible ?

 

 

2 Replies

  • Fowmy's avatar
    Fowmy
    Icon for Super User rankSuper User

    Anonymous 

    Create a dedicated Date Table in your data model and establish a one-to-many relationship between the Date Table and your Fact Table using the date column. When visualizing data, use the date column from the Date Table on the X-axis. To ensure that all dates are displayed, even those with no corresponding data, right-click on the axis and enable "Show items with no data."

    here a the code create a ates table, modify as needed.

    Calendar = 
    	ADDCOLUMNS(
    		CALENDAR(date(2024,1,1),date(2025,12,31))
    		,"Day Name",FORMAT([Date],"DDDD")
    		,"Day of Week",(WEEKDAY([Date],1))
    		,"Day of Month",DAY([Date]) 
    		,"Week",DATE(YEAR([Date]),MONTH([Date]),DAY([Date]))-(WEEKDAY([Date],1)-1)
    		,"Week Name", "Week of " & DATE(YEAR([Date]),MONTH([Date]),DAY([Date]))-(WEEKDAY([Date],1)-1)
    		,"Week of Year", WEEKNUM([Date],1)
    		,"Month", DATE(YEAR([Date]),MONTH([Date]),1)
    		,"Month Name", FORMAT([Date],"MMMM")
    		,"Month of Year", MONTH([Date])
    		,"Month Year Name", FORMAT([Date],"MMM") & " " & YEAR([Date])
    		,"Month Year Name Sort",(100*YEAR([Date])+MONTH([Date]))
    		,"Quarter",DATE(YEAR([Date]),SWITCH(ROUNDUP(DIVIDE(MONTH([Date]),3,1),0),1,1,2,4,3,7,4,10),1)
    		,"Quarter Name", "Q" & ROUNDUP(MONTH([Date])/3,0)
    		,"Quarter Year Name", "Q" & ROUNDUP(MONTH([Date])/3,0) & " " & YEAR([Date])
    		,"Year", DATE(YEAR([Date]),1,1)
    		,"Year #",YEAR([Date])
    	)





  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

    Did the reply Fowmy offered help you solve the problem, if it helps, you can consider to accept it as a solution so that more user can refer to, or if you have other problems, you could offer some information so that can provide more suggestion for you.

    How to Get Your Question Answered Quickly - Microsoft Fabric Community

    And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

    How to upload PBI in Community

    Best regards,

    Lucy Chen