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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
u4us1923
Frequent Visitor

csv import this table is empty

Hello Everyone ..

I download csv files from a system every week. Sometimes there is no data for that week. Therefore, if there is no data in that csv, PowerBI will say “this table is empty” for that week's files. How can I change the table to “zero” if there is no data in the csv file of that week. If there data it does nothing.

 

Column -> Argument /Filters/Count

 

Thank you !

4 REPLIES 4
Anonymous
Not applicable

Hi @u4us1923 ,

 

As a workaround, you can create a date table with full dates and then merge with your source data to fill in the missing dates.

Here’s a step-by-step guide to achieve this:

1.Create a list of all dates within the range: Refer to  Create Calendar Table Using Power Query M Language (mssqltips.com)
2.Merge the list of dates with your data: Merge this list with your existing data to ensure every date within the range is represented.
3.Fill missing dates with zero quantity: Replace any missing quantities with 0.

 

Best Regards,

Stephen Tao

 

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

 

Omid_Motamedise
Super User
Super User

use if function with any formula presented in the below youtube post

 

https://youtu.be/DHB2ejpEGxU?si=CdoQ0wWjh9nOivEV

 

If my answer helped solve your issue, please consider marking it as the accepted solution. It helps others in the community find answers faster—and keeps the community growing stronger!
You can also check out my YouTube channel for tutorials, tips, and real-world solutions in Power Query with the following link
https://youtube.com/@omidbi?si=96Bo-ZsSwOx0Z36h
dufoq3
Super User
Super User

Check Table.IsEmpty.


Note: Check this link to learn how to use my query.
Check this link if you don't know how to provide sample data.

Thank you for the reply .. but .. I don't want to create a new table. I also loaded data from csv... my question is different. Some weeks there is data for all but some weeks there is no data for http400 or http500. for example; If there is no data for http500 that week I want to create a new row http500 -> Count --> 0 (zero)

 

u4us1923_0-1727256250186.png

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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