Forum Discussion

SteveKingdon's avatar
SteveKingdon
Frequent Visitor
4 years ago

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

  • 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

    )

    • SteveKingdon's avatar
      SteveKingdon
      Frequent Visitor

      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

      • SteveKingdon's avatar
        SteveKingdon
        Frequent Visitor

        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