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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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.
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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.