Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I am creating a line chart, refer below.
As you can see it's not following the expected pattern.
I have also used date(date#(datadate,'dd-mmm-yyyy'),'mmm d').
Please suggest how to fix this discrepancy.
Note: measure : sum(sales)
Thank you.
Hi, it's a format issue, your date field in the sales table has a DD/MM/YYYY format , and it's a date, (by default rigth aligned), the date field in the calendar is in DD/MMM/YYYY format and it's a string (by default left aligned).
I switched the name of the dates and date fields in the calendar and it seems to work. Also added a new script sheet using a master calendr to avoid that you have to write each day.
There are still some values with null, it's because of this expression:
If(DayNumberOfYear(Today(1))>DayNumberOfYear(Date)
,Dual(Date(Date,'MMM D'),DayNumberOfYear(Date))
,Null()) as YearDayNoYTD // Number of days above today will get null()
If you don't want to show this values, expand the YearDayNoYTD dimension and uncheck the option to show null values.
Hi, thats the null values, those are records with values on sales fields that doesn't has any relation with the datadate field.
You can add a table with datadate as dimesnion ans sum(sales) as expression, and add some dimesnions to check where those values come from and why they don't have a date associated.
Yes, I tried to figure out but unable to get a solution. I have attached the dummy data. Kindly assist and share your feedback. Thanks!
Please note, It's a dummy data with the similar issue.
Hi, it's a format issue, your date field in the sales table has a DD/MM/YYYY format , and it's a date, (by default rigth aligned), the date field in the calendar is in DD/MMM/YYYY format and it's a string (by default left aligned).
I switched the name of the dates and date fields in the calendar and it seems to work. Also added a new script sheet using a master calendr to avoid that you have to write each day.
There are still some values with null, it's because of this expression:
If(DayNumberOfYear(Today(1))>DayNumberOfYear(Date)
,Dual(Date(Date,'MMM D'),DayNumberOfYear(Date))
,Null()) as YearDayNoYTD // Number of days above today will get null()
If you don't want to show this values, expand the YearDayNoYTD dimension and uncheck the option to show null values.