Hi All,
I am using the DAX below to allocate a monthly budget to each day, but I only want to allocate on weekdays as we do not routinely sell on a weekend.
So I need to be able to work out what the daily value is based on the number of weekdays in the month
Tehn only allocate this value to weekdays
Lots of different ways to handle this depending on what fields you have available in your date table. In Power Query, you could create a conditional field called IsWeekday, and then filter on that in place of the LEFT(1) construct above.
The problem is your DailyBudget variable is calling this measure: [Total Budget (FX)]. Without knowing what that measure’s doing I can’t make any additional progress on providing you a solution. At minimum, can you please send me the DAX code for that measure?
Also FYI, here’s a video I put together on quick techniques for anonymizing confidential data. Let’s see if we can solve this with just the measure code first though.
Hi @BrianJ
Total Budget is literally just the sum of the Budget value column but I add a variable to the Total Budget (FX) so it automatically changes for AUD or USD
The Budget is a monthly number per territory per product group.
It is not set as a daily number
That is why I am doing the Allocation calculation dividing it by the number of weekdays (Which is working)
But now I just need to allocate this daily value back to each weekday, and ignore the weekends.
Hope that makes sense
To provide a specific, working solution on this I’m going to need an anonymized/masked PBIX file. Otherwise, without being able to see the whole picture including your data model, I’m just taking shots in the dark.
If it’s just about displaying the value you can add another IF clause something like below.
Else please provide a sample PBIX file as @BrianJ mentioned.