Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Need help with Table Visualization error in PowerBI desktop

Hi everyone,

I have made a table visualization of my data for my dashboard which shows daily data, 7 days rolling average & cumulative total.

I have two tables presenting different data sets, but left table (as you can see in the pic: "Daily Fitup Inch Dia" is showing an error where it fills up empty spaces with the inital rolling average which was "5.71" in all the empty spaces. 

But the table right next to it: Daily Weld Inch Dia (with is using the exact same syntax for the measures, but ofc different data set) is displaying without errors.

 

Please help me out on how I can fix this.Screenshot (82).png

1 ACCEPTED SOLUTION

Hi @Anonymous 

 

Your measure works well in my test, however I create another measure which could reproduce your issue. Please refer to the following image first and check the difference between them.

112701.jpg

 

The cause is that the dates in 'FITUP INCH DIA' table are not continuous, however dates in 'Dates' Table are continuous. When using 'FITUP INCH DIA'[Date] column in the measure, if the date does not exist in 'FITUP INCH DIA' table, then the reult of LASTDATE() will be blank as well as the DATESINPERIOD(), which makes the measure value blank. However, when using 'Dates'[Date] column in the measure, the date always exist in 'Dates' table so the  LASTDATE() and DATESINPERIOD() will not be blank, which makes the measure value not blank.

 

Kindly let me know if this helps.

 

Community Support Team _ Jing Zhang
If this post helps, please consider Accept it as the solution to help other members find it.

View solution in original post

9 REPLIES 9
Anonymous
Not applicable

Syntax for Rolling Average:

7 DAYS FITUP INCH AVG =
CALCULATE(
SUM('FITUP INCH DIA'[FITUP Inch DIA]),
DATESINPERIOD(Dates[Date], LASTDATE('FITUP INCH DIA'[Date]),-7,DAY)
)
/7
 

 Below is some sample data from the Sheet: FITUP INCH DIA

 

TYPEDRAWINGNUMBERSPOOLNOWELDNO/JOINTNOFITUP Inch DIASCH/WTStreamSkid BatchDate
DUPLEX HEADERW1WRS01-BR005-0250-P3400-PERW1WRS01-BR005-0250-P3400-PER-02J-1610Sch 5S3269/17/2020
DUPLEX HEADERW1WRS01-BR005-0250-P3400-PERW1WRS01-BR005-0250-P3400-PER-02J-1610Sch 5S3379/17/2020
DUPLEX HEADERW1WRS01-BR005-0250-P3400-PERW1WRS01-BR005-0250-P3400-PER-02J-1610Sch 5S3489/17/2020
DUPLEX HEADERW1WRS01-BR006-0500-P3400-PERW1WRS01-BR006-0500-P3400-PER-01J-0620Sch 5S3159/9/2020
DUPLEX HEADERW1WRS01-BR006-0500-P3400-PERW1WRS01-BR006-0500-P3400-PER-01J-0620Sch 5S3269/9/2020
DUPLEX HEADERW1WRS01-BR006-0500-P3400-PERW1WRS01-BR006-0500-P3400-PER-01J-0620Sch 5S3379/11/2020
DUPLEX HEADERW1WRS01-BR006-0500-P3400-PERW1WRS01-BR006-0500-P3400-PER-01J-0620Sch 5S3489/11/2020
DUPLEX ISOW1WRS01-BR008-0150-P3400-BRNW1WRS01-BR008-0150-P3400-BRN-0572Sch 40S31510/5/2020
DUPLEX ISOW1WRS01-BR008-0150-P3400-BRNW1WRS01-BR008-0150-P3400-BRN-0582Sch 40S31510/5/2020
DUPLEX ISOW1WRS01-BR008-0150-P3400-BRNW1WRS01-BR008-0150-P3400-BRN-0592Sch 40S31510/5/2020
DUPLEX ISOW1WRS01-BR008-0150-P3400-BRNW1WRS01-BR008-0150-P3400-BRN-05102Sch 40S31510/5/2020
DUPLEX ISOW1WRS01-BR008-0150-P3400-BRNW1WRS01-BR008-0150-P3400-BRN-06112Sch 40S31510/5/2020
Anonymous
Not applicable

@v-jingzhang : PFA data above for your reference

Hi @Anonymous 

 

Your measure works well in my test, however I create another measure which could reproduce your issue. Please refer to the following image first and check the difference between them.

112701.jpg

 

The cause is that the dates in 'FITUP INCH DIA' table are not continuous, however dates in 'Dates' Table are continuous. When using 'FITUP INCH DIA'[Date] column in the measure, if the date does not exist in 'FITUP INCH DIA' table, then the reult of LASTDATE() will be blank as well as the DATESINPERIOD(), which makes the measure value blank. However, when using 'Dates'[Date] column in the measure, the date always exist in 'Dates' table so the  LASTDATE() and DATESINPERIOD() will not be blank, which makes the measure value not blank.

 

Kindly let me know if this helps.

 

Community Support Team _ Jing Zhang
If this post helps, please consider Accept it as the solution to help other members find it.

Anonymous
Not applicable

Hi @v-jingzhang ,

This worked out well for me! Thanks for your time, appreciate it!!

@Anonymous You are welcome. Glad it worked!

Anonymous
Not applicable

Hey @amitchandak 

Can you help on the same?

@Anonymous 

Can you please share some sample data in table format as well as the measure codes for 7 days rolling average so that I can test it further? And is there any relationship between the tables? Maybe the filters in the matrix context are different and would affect this. Thanks.

 

Best Regards,
Community Support Team _ Jing Zhang

Anonymous
Not applicable

Hey Amit,

Attached screenshot showing the recurring values which aren't supposed to be filled in empty slots.

As you can see on the right table, that error isn't happening

Screenshot (82).png

amitchandak
Super User
Super User

@Anonymous , Can you please highlight the error, not very clear with the screenshot.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.