Forum Discussion
Rana
10 years agoRegular Visitor
Difference between 2 columns
I have a Matrix in PowerBI which is showing data for 2 months (month is a string not a date column like Aug, Sept or any selected 2 months). Matrix shows me Total for both months, instead of Sum i ne...
- 10 years ago
@Rana,
A much cleaner code than the one posted by me before (and deleted) is the following:
PreviousDay = CALCULATE ( SUM (FactData[Employees]); Filter (ALL(FactData[Date]);FactData[Date]=Max(FactData[Date])-1) ) Difference = IF( ISBLANK([PreviousDay]); 0; SUM(FactData[Employees])-[PreviousDay] )
Rana
10 years agoRegular Visitor
Everything you said I already have in my mind, you can do this simply in Excel but not in Power BI, stumped a bit.
Rana
10 years agoRegular Visitor
I actually was able to do that in Tableau, it has an option to get a differencial between values in a Matrix. I just had to hide the 1st selected Month.
- leonardmurphy10 years agoSkilled Sharer
I don't know how that feature works in Tableau...but I can see why you'd want to do such a thing.
Even in Excel though, you'd have to do the calculation outside of a single pivot table, wouldn't you?
Perhaps an opportunity for a custom visualization (one that allows you to select & then does a side-by-side comparison of 2 selected dates/categories/other attributes)