Forum Discussion

NewbieJono's avatar
NewbieJono
Post Partisan
4 years ago

Splitting a total

I have a total Table each day, but i wish to split the total by a certain percentage each date. on different days the percentage changes.

 

i am using this code and it works for 1 day, but i need it to work over time, as sample rates change

 

 

Split 1 = 

VAR Total = [Total]
 
VAR Samplerate = 
    CALCULATE(
     SUM('DIM - Sampling'[%Value]),
     'DIM - Sampling'[Stream] = "Split 1 %"
    )

Return

divide(total,100) * AquireSampleRAte

 

 

 

here is an example of the data

 

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi  NewbieJono ,

     

    No problem found according to your dax formula, you say your formula can work for a day, but in dax there is no information associated with the date found.

    Are you using a slicer or other calculation table with date format.

    [%value] and [Stream] were not found in the sample data, can you provide more details.

     

    Best Regards,

    Liu Yang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.