Forum Discussion

Abhijsrwala1's avatar
Abhijsrwala1
Frequent Visitor
4 years ago

Need Help In Sum Function for begineer

The Total of this column is 358.

 

When I create the measure with the formula  =sum(sch Time) it gives me 83! 

When I create a column with formula=sumx(table name, sch time) it gives corect result 358 but it is populated as a column, where all rows have same values.

Can't a measure be created which gives 358.
PS: Sch Time is a calculated column

3 Replies

  • tamerj1's avatar
    tamerj1
    Community Champion

    Hi Abhijsrwala1 
    The measure should give the same value. What changes in the case of measure is the filter context. There must be some filter applied which you rae not aware of. 

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Abhijsrwala1 ,

    How did you set your visual in Power BI? And if you set any filter on the visual or create a slicer to filter the data? Please update the formula of your measure as below and check if it can get the correct result:

    Measure = CALCULATE ( SUM ( 'tablename'[sch Time] ), ALL ( 'tablename' ) )

    If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

    How to upload PBI in Community

    Best Regards

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi  Abhijsrwala1 ,

    Whether your problem has been resolved? If yes, could you please mark the helpful post as Answered? It will help the others in the community find the solution easily if they face the same problem as yours. Thank you.

    Best Regards