Forum Discussion
ciarano
9 years agoFrequent Visitor
Current day sum vs previous day sum
Hi, Very new to Power BI, so any help is appreciated. I have a database table that has fields Category, SubCategory, Value and ReportDate. The Value is not a sales figure, it's a point-in-tim...
- 9 years ago
I think I have something that works.
Would be interested in hearing feedback if this is a good approach or if there's a better way:
Previous Value = CALCULATE ( SUM (ValuationTable[Value]), FILTER ( ALL (ValuationTable), COUNTROWS ( FILTER ( ValuationTable, EARLIER (ValuationTable[ReportDate]) = DATEADD(ValuationTable[ReportDate], -30, DAY) && EARLIER (ValuationTable[Category]) = ValuationTable[Category] ) ) ) )
ciarano
9 years agoFrequent Visitor
I think I have something that works.
Would be interested in hearing feedback if this is a good approach or if there's a better way:
Previous Value =
CALCULATE (
SUM (ValuationTable[Value]),
FILTER (
ALL (ValuationTable),
COUNTROWS (
FILTER (
ValuationTable,
EARLIER (ValuationTable[ReportDate]) = DATEADD(ValuationTable[ReportDate], -30, DAY)
&& EARLIER (ValuationTable[Category]) = ValuationTable[Category]
)
)
)
)anupampandey
Helper III
9 years agoHi Ciarano,
I am having transaction amount, Status and date in my data. wanted to show the value with indicator showing green (if value is greater than previous day) or red (if it is lesser than previos day). Please help me on the same.
Thanks,
Anupam