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

Removing empty space until the first column with value

Hello, I am trying to create a visual with empty columns in between, but removing any empty space until the first column with value.

lukaspocius_1-1679574182701.png

I am also slicer to change between projects so the date range needs to be dynamic as it changes by different projects.

For values currently using (the +0 is for not skipping columns):

Payment test = CALCULATE(SUM('Payment'[Payment]),Payment[Type]="Payment" || Payment[Type]="Deposit") + 0
 
And for dates themselves it is every monday of week as cash inflows are assigned to specific week starts to reduce column count.
2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , Try if this formula can help, assuming you are using date table

 

0 between range
Measure = var _1= CALCULATE(SUM('Payment'[Payment]),Payment[Type]="Payment" || Payment[Type]="Deposit")+0
var _min = minx(ALLSELECTED('Calendar'), 'Calendar'[Date])
var _max = maxx(ALLSELECTED('Calendar'), 'Calendar'[Date])
return
CALCULATE(if(max('Calendar'[Date]) <_min || max('Calendar'[Date]) >_max , BLANK(), _1))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi, I tried something similar but it did not work. Tried to do exactly like you but the result is:

measure powerbi =
var _1= CALCULATE(SUM('Payment'[Payment]),Payment[Type]="Payment" || Payment[Type]="Deposit")+0
var _min = minx(ALLSELECTED('Dates'), 'Dates'[Date])
var _max = maxx(ALLSELECTED('Dates'), 'Dates'[Date])
return
CALCULATE(if(max('Dates'[Date]) <_min || max('Dates'[Date]) >_max , BLANK(), _1))

 

Result visual:

lukaspocius_1-1679642688763.png

 


 

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