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

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))

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
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.

Top Solution Authors