Forum Discussion
How To Sum Without Being Affected By Date Slicer
I want to sum my data measure without affected date slicer. When i use the this dax,
Sales = CALCULATE(SUM(FactSales[total_price]),FILTER(FactSales,FactSales[datetime] <=DimComprePeriod[End Compare Period] && FactSales[datetime] >= [Start Compare Period]))
Sales = CALCULATE(SUM(FactSales[total_price]),FILTER(All(FactSales),FactSales[datetime] <=DimComprePeriod[End Compare Period] && FactSales[datetime] >= [Start Compare Period]))3 Replies
- amitchandak
Super User
samil01 , On have a separate date table joined with the date of your fact
Sales = CALCULATE(SUM(FactSales[total_price]),FILTER(All(Date),Date[datetime] <=[End Compare Period] && Date[datetime] >= [Start Compare Period]))
Independent date table
Need of an Independent Date Table:https://www.youtube.com/watch?v=44fGGmg9fHI
- samil01Frequent Visitor
amitchandakfirst of all thank you for your answer,
I have already a date table but i want to sum totals by hour. For example i want to sum from beginning of the yesterday to until which hour are we in right now, e.g for now i want to sum 2022-05-22 00:00:00 - 2022-05-22 11:00:00 so i need datetime field.
- v-zhangti
Community Support
Hi, samil01
Can you provide some sample data or simple pbix files? Sensitive information can be removed in advance. What kind of expected results do you expect? You can also show it with pictures.
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more.