Forum Discussion

deepvibha's avatar
deepvibha
Advocate II
9 years ago
Solved

Value summation by date

Hello,   I have a table as follows:   Date Department Received Within 24 hrs Within 48 hrs 07-11-16 Cornea 7 2 3 07-11-16 Glaucoma 10 3 2 07-11-16 Retina 8 4 3 07-1...
  • Anonymous's avatar
    Anonymous
    9 years ago

    Hi deepvibha

     

    Just change the measures as follows and rest remaining the same as my previous reply

     

    Create Measures - SumReceived, Sum24Hrs, Sum48Hrs as follows

        SumReceived = Calculate(sum (FactTable[Received]),FactTable[Attribute] = "Received")

        Sum24Hrs = Calculate(sum (FactTable[Received]),FactTable[Attribute] = "Within 24 Hrs")

        Sum48Hrs = Calculate(sum (FactTable[Received]),FactTable[Attribute] = "Within 48 Hrs")

     

    This should work.

     

    If this works please accept it as a solution and also give KUDOS.

     

    Cheers

     

    CheenuSing

     

  • Anonymous's avatar
    Anonymous
    9 years ago

    Hi deepvibha

     

    You will not be ablt to expactly replicate the excel output in Power BI.

     

    There are two approaches possible.

     

    1. Create a column called DateByDepartment =  Format([TransDate],"DD/MM/YYYY") & "-" & [Department]

    2. Use this as a x-axis and then the measures 24hrs% and 48hrs% as Y-axis.

     

    The out put will look like

     

                                     

     

                         

     

    The x-axis will look like

                             

    Very close to Excel

     

    The second approach is to create a hierarchy

    1. Right click on the Date column of your table and select NewHierarchy

    2. Drag the Department also under this.

    3. Rename this hierarchy as TransDateDepartment

    4. Use this as x-axis and the measures as y-axis.

    5. The chart will initially look like

        

    6. Click on the weighing scale like icon you will see the output as

     

     

     When you click on the two down arrows icon you will get it at Department level.

     

     

    If this works give additonal KUDOS.

     

    Cheers

     

    CheenuSing