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
Yazid
Helper I
Helper I

Shorten a table (remove rows) as of condition (1st blank cell)

Dear,

 

I have a table "TRUNCATED 2024" and I want to shorten the table as soon as the 1st empty cell begins

 

Yazid_0-1718137358204.png

 

Thanks in advance for your support

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Yazid ,

 

1. Based on your description, I created some data and wrote a calculated column.

Column =
VAR _current_year = YEAR(TODAY())
RETURN
SWITCH(TRUE(),
'Table'[date].[Year] = _current_year,'Table'[date],
BLANK())

vkaiyuemsft_0-1718156687274.png


2. Create the calculation table.

table2 = FILTER(
'Table',
NOT(ISBLANK('Table'[Column]))
)

vkaiyuemsft_1-1718156877980.png

 

If your Current Period does not refer to this, please clarify in a follow-up reply.

 

Best Regards,

Clara Gong

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
Anonymous
Not applicable

Hi @Yazid ,

 

1. Based on your description, I created some data and wrote a calculated column.

Column =
VAR _current_year = YEAR(TODAY())
RETURN
SWITCH(TRUE(),
'Table'[date].[Year] = _current_year,'Table'[date],
BLANK())

vkaiyuemsft_0-1718156687274.png


2. Create the calculation table.

table2 = FILTER(
'Table',
NOT(ISBLANK('Table'[Column]))
)

vkaiyuemsft_1-1718156877980.png

 

If your Current Period does not refer to this, please clarify in a follow-up reply.

 

Best Regards,

Clara Gong

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

Thanks a lot !

ExcelMonke
Super User
Super User

You can filter out 0s. But the table will still contain these. Best way to do this is in the Transform data steps. Your DAX won't work here, and you will need to use Power Query M Language





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors