Forum Discussion
Limit data flowing in until a certain date
This is quite complex so I will try to explain it as simple as possible.
The chart below shows weekly utilization.
I have set my date locally on Tuesday 26 June 2018 deliberately because what I want is to be able to bring in data for the current week only from Wednesday and onwards and not from Sunday when the week starts.
In other words, having set my date to 26th of June (Tuesday) I would like to limit the data reflected on the green bar for the week of 30 Jun in the chart. This line should only be appeared the next day, which would be Wednesday, but until then I wouldn't like BU% (which is the calculated measure that is reflected) to be appeared.
The measure which generates this green column is the following:
Billable Util_CDL_WEEK = CALCULATE(SUM('cdl weekly'[Hours]),'TIME CATEGORY'[Time Category All]="Billable")/CALCULATE(SUM('cdl weekly'[Hours]),'TIME CATEGORY'[Time Category All]="Available"))I tried the following
Billable Util_CDL_WEEK = IF(WEEKDAY(TODAY(),1)<4,"-",CALCULATE(SUM('cdl weekly'[Hours]),'TIME CATEGORY'[Time Category All]="Billable")/CALCULATE(SUM('cdl weekly'[Hours]),'TIME CATEGORY'[Time Category All]="Available"))but it disappears all previous weeks results which is obviously wrong.
Is there any way to manipulate this ?
7 Replies
- Greg_Deckler
Community Champion
Have any sample/example data? Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
- v-juanli-msft
Community Support
Hi harrinho
Try formula below
Billable Util_CDL_WEEK 2=
IF (
AND (
WEEKNUM ( [date] ) = WEEKNUM ( DATE ( 2018, 6, 30 ) ),
WEEKDAY ( [date] ) < 4
),
0,
[Billable Util_CDL_WEEK]
)Best Regards
Maggie
- harrinho
Helper III
Thanks for the reply v-juanli-msft. I don't have the date fields you suggest here. How could that be addressed please ?
- v-juanli-msft
Community Support
Hi harrinho
Which column do you add to the Axis of the bar chart?
The date column in my formula should be in date type and be related with the columns added to your Axis.
Best Regards
Maggie