cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SteveKingdon
Frequent Visitor

Adding fixed costs to daily data

Hi,

 

I have daily wage costing in BI and I want to add some fixed cost to this daily figure. I then want to be able to filter the new total cost over various time frames. I current do not have this fixed cost in a table or sheet. So I can report weekly cost figures.

 

Currently the only way I can think of doing it is to have a separate spread sheet with the fixed cost inputted for every day so that I can use a calculated column or measure. But this means that I need to enter the number for each day which will take a long time. Is there some DAX code that can be used to work this out? 

 

In an Idea world i would like to have it in a simple table that states a time frame for the fixed cost so that if we change it from a specifc date I do not hev to again complete a sepertae column or re caululate. 

 

i.e. Fixed rate

£xxxx.xxx from 01.01.21 untill 01.05.21

£xxxx.xx from the 02.05.21 untill  31.12.21

 

Any ideas?

 

Thnaks


Steve

3 REPLIES 3
amitchandak
Super User
Super User

@SteveKingdon , Based on what I got. create a new column in DAX

 

Switch( True() ,

[Date] >= date(2021,01,01) && [Date] <= date(2021,05,01) , 1.000 ,

[Date] >= date(2021,05,02) && [Date] <= date(2021,12,31) , 1.200,

1.300

)



Learn Power BI - Full Course with Dec-2022, with new DAX functions like Window, Index, Offset !!
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! Proud to be a Super User! !!
Formatted Profit and Loss Statement with empty lines

Hi Thanks for this. Just wondering what the 1.300 is representing?

 

Can the values 1.200 be held in a table any where and be referenced or does it have t be in the DAX code?

 

So that if some one who is not a BI dax user can update and the report will update accordingly?

 

Thanks


Steve

Hi,

 

This has sort of solved my problem. However it is over allocating. The data I am adding this is total from multple empoyees work £xxs earned  a day. 

 

I need to work out

Total pay for a team (totals multiple peoples pay under a total cost for the team) - done

I need to work this daily and over a fixed time frane 1-xx days - done

Allocation of the fixed cost to the team - not done. The code above is allocating the fixed cost multiple times when I need it to be allocated once per day to the team (then summed if required over mutiple days).

 

I hope this makes sense?

 

Steve

cating 

Helpful resources

Announcements
Carousel_PBI_Wave1

2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

Power BI Summit Carousel 2

Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

Thank you 2022 Review

2022 Monthly Feature Releases

We had a great 2022 with a ton of feature releases to help you drive a data culture.