cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
Anonymous
Not applicable

Missing data in time series part 2.

Hi Experts

 

I posted the following question on Friday just gone https://community.powerbi.com/t5/Desktop/Missing-data-in-time-series-Power-Bi-Desktop/m-p/678557/hig...

 

The expert that provide that feedback/solution meationed the the solution could also be worked out using a measure, how would this be done.

 

1 ACCEPTED SOLUTION

hi, @Anonymous 

Just use this formula to create a dim date table

Dim Date=ADDCOLUMNS(CALENDAR(MIN('Table'[Time]),MAX('Table'[Time])),"1st of month",DATE(YEAR([Date]),MONTH([Date]),1))

or CALENDAR(MIN('Table'[Time]),MAX('Table'[Time])) and then add a 1st of month calculate column

 

Then create the relationship withDim table by Date column and Time column.

Now when create the visual, use "1st of month" column by the same logic.

 

 

Best Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-lili6-msft
Community Support
Community Support

hi, @Anonymous 

You could try this way:

Step1:

Define a dim date table by this formula

Dim Date = FILTER(CALENDAR(MIN('Table'[Time]),MAX('Table'[Time])),DAY([Date])=1)

Step2:

Then create the relationship with data table.

Step3:

Just add a conditional "+0" in measure like below:

Measure = CALCULATE(SUM('Table'[Observations]))+0

Result:

2.JPG

 

and here is pbix file, please try it.

 

Best Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi Lin

 

Firstly thanks for the excellent feedback. I just have one question. in the table with the observations. if i had multiple entries in this table for X sales throughout the month and i wanted to group the sales for the 1st of every month for for the period in question. would this also work and what is the intermediate step i would need to preform.

 

hi, @Anonymous 

Just use this formula to create a dim date table

Dim Date=ADDCOLUMNS(CALENDAR(MIN('Table'[Time]),MAX('Table'[Time])),"1st of month",DATE(YEAR([Date]),MONTH([Date]),1))

or CALENDAR(MIN('Table'[Time]),MAX('Table'[Time])) and then add a 1st of month calculate column

 

Then create the relationship withDim table by Date column and Time column.

Now when create the visual, use "1st of month" column by the same logic.

 

 

Best Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors