Forum Discussion
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.
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):
2 Replies
- amitchandakSuper 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))- AnonymousNot 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")+0var _min = minx(ALLSELECTED('Dates'), 'Dates'[Date])var _max = maxx(ALLSELECTED('Dates'), 'Dates'[Date])returnCALCULATE(if(max('Dates'[Date]) <_min || max('Dates'[Date]) >_max , BLANK(), _1))Result visual: